Changeset d7a9df5 in OpenWorkouts-current for ow/tests/models/test_workout.py


Ignore:
Timestamp:
Feb 10, 2019, 8:28:44 AM (5 years ago)
Author:
Borja Lopez <borja@…>
Branches:
current, feature/docs, master
Children:
e547af5
Parents:
6662a84
Message:

Done some improvements on the dashboard:

  • Remove hr/speed/cad info from the workouts list (too much info)
  • Added workout sport to the workouts list
  • Replaced full notes for each workout with a shortened/trimmed version (done this in the workouts list in the profile page too)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ow/tests/models/test_workout.py

    r6662a84 rd7a9df5  
    143143        workout.distance = 44.44444444
    144144        assert workout.rounded_distance == 44.44
     145
     146    def test_trimmed_notes(self):
     147        workout = Workout()
     148        assert workout.notes == ''
     149        assert workout.trimmed_notes == ''
     150        workout.notes = 'very short notes'
     151        assert workout.notes == 'very short notes'
     152        assert workout.trimmed_notes == 'very short notes'
     153        workout.notes = 'long notes now, repeated' * 1000
     154        assert len(workout.notes) == 24000
     155        assert len(workout.trimmed_notes) == 224
     156        assert workout.trimmed_notes.endswith(' ...')
    145157
    146158    def test_has_hr(self):
Note: See TracChangeset for help on using the changeset viewer.