- Timestamp:
- Jan 9, 2019, 12:31:33 PM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- 119412d
- Parents:
- e3d7b13
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/tests/models/test_workout.py
re3d7b13 r53bb3e5 3 3 from datetime import datetime, timedelta, timezone 4 4 from decimal import Decimal 5 from unittest.mock import patch 5 from unittest.mock import patch, Mock 6 6 7 7 import pytest … … 195 195 assert workout.atemp['max'] == 12 196 196 assert workout.atemp['avg'] == 5 197 198 def test_tracking_file_path(self): 199 workout = Workout() 200 # no tracking file, path is None 201 assert workout.tracking_file_path is None 202 # workout still not saved to the db 203 workout.tracking_file = Mock() 204 workout.tracking_file._p_blob_uncommitted = '/tmp/blobtempfile' 205 workout.tracking_file._p_blob_committed = None 206 assert workout.tracking_file_path == '/tmp/blobtempfile' 207 workout.tracking_file._p_blob_uncommitted = None 208 workout.tracking_file._p_blob_committed = '/var/db/blobs/blobfile' 209 assert workout.tracking_file_path == '/var/db/blobs/blobfile' 197 210 198 211 def test_load_from_file_invalid(self):
Note: See TracChangeset
for help on using the changeset viewer.