- Timestamp:
- Dec 21, 2018, 11:00:25 AM (5 years ago)
- Branches:
- current, feature/docs, master
- Children:
- fe6089a
- Parents:
- d507f75
- Location:
- ow/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ow/tests/models/test_workout.py
rd507f75 r31adfa5 77 77 workout = Workout(start=start_date) 78 78 assert workout.start_time == start_date.strftime('%H:%M') 79 80 def test_start_in_timezone(self): 81 start_date = datetime.now(tz=timezone.utc) 82 str_start_date = start_date.strftime('%d/%m/%Y %H:%M (%Z)') 83 workout = Workout(start=start_date) 84 assert workout.start_in_timezone('UTC') == str_start_date 85 assert workout.start_in_timezone('Europe/Madrid') != str_start_date 86 assert workout.start_in_timezone('America/Vancouver') != str_start_date 87 88 def test_end_in_timezone(self): 89 start_date = datetime.now(tz=timezone.utc) 90 end_date = start_date + timedelta(minutes=60) 91 str_end_date = end_date.strftime('%d/%m/%Y %H:%M (%Z)') 92 workout = Workout(start=start_date, duration=timedelta(minutes=60)) 93 assert workout.end_in_timezone('UTC') == str_end_date 94 assert workout.end_in_timezone('Europe/Madrid') != str_end_date 95 assert workout.end_in_timezone('America/Vancouver') != str_end_date 79 96 80 97 def test_split_duration(self): -
ow/tests/views/test_user.py
rd507f75 r31adfa5 259 259 # loaded user profile 260 260 data = ['firstname', 'lastname', 'email', 'nickname', 'bio', 261 'birth_date', 'height', 'weight', 'gender' ]261 'birth_date', 'height', 'weight', 'gender', 'timezone'] 262 262 assert list(response['form'].data.keys()) == data 263 263 # and check the email to see data is properly loaded
Note: See TracChangeset
for help on using the changeset viewer.