Index: ow/tests/models/test_user.py
===================================================================
--- ow/tests/models/test_user.py	(revision 778d53d0180c6115a5a8a7204516018101ee7326)
+++ ow/tests/models/test_user.py	(revision 04c882dbb6a6a21c6e6c84e0dbfb4ddf31faefa4)
@@ -659,4 +659,10 @@
             'distance': Decimal(0),
             'elevation': Decimal(0),
+            'max_time': timedelta(0),
+            'max_time_wid': None,
+            'max_distance': Decimal(0),
+            'max_distance_wid': None,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None
         }
         # add a cycling workout happening now
@@ -665,7 +671,8 @@
             start=datetime.now(timezone.utc),
             duration=timedelta(minutes=120),
-            distance=66,
-        )
-        root['john'].add_workout(workout)
+            distance=Decimal(66),
+        )
+        root['john'].add_workout(workout)
+        cycling_wid = workout.workout_id
         # only one workout, one sport, so the default will show totals
         # for that sport
@@ -675,4 +682,10 @@
             'distance': Decimal(66),
             'elevation': Decimal(0),
+            'max_time': timedelta(minutes=120),
+            'max_time_wid': cycling_wid,
+            'max_distance': Decimal(66),
+            'max_distance_wid': cycling_wid,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None
         }
         # Add a running workout
@@ -681,7 +694,8 @@
             start=datetime(2018, 11, 25, 10, 00, tzinfo=timezone.utc),
             duration=timedelta(minutes=45),
-            distance=5,
-        )
-        root['john'].add_workout(workout)
+            distance=Decimal(5),
+        )
+        root['john'].add_workout(workout)
+        running_wid = workout.workout_id
         # the favorite sport is running now
         assert root['john'].sport_totals() == {
@@ -690,4 +704,10 @@
             'distance': Decimal(5),
             'elevation': Decimal(0),
+            'max_time': timedelta(minutes=45),
+            'max_time_wid': running_wid,
+            'max_distance': Decimal(5),
+            'max_distance_wid': running_wid,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None,
         }
         # but we can get the totals for cycling too
@@ -697,4 +717,10 @@
             'distance': Decimal(66),
             'elevation': Decimal(0),
+            'max_time': timedelta(minutes=120),
+            'max_time_wid': cycling_wid,
+            'max_distance': Decimal(66),
+            'max_distance_wid': cycling_wid,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None
         }
         # adding a new cycling workout, in a different year
@@ -703,7 +729,9 @@
             start=datetime(2017, 11, 25, 10, 00, tzinfo=timezone.utc),
             duration=timedelta(minutes=60),
-            distance=32,
-        )
-        root['john'].add_workout(workout)
+            distance=Decimal(32),
+            uphill=Decimal(430)
+        )
+        root['john'].add_workout(workout)
+        second_cycling_wid = workout.workout_id
         # now cycling is the favorite sport
         assert root['john'].sport_totals() == {
@@ -711,5 +739,11 @@
             'time': timedelta(minutes=180),
             'distance': Decimal(98),
-            'elevation': Decimal(0),
+            'elevation': Decimal(430),
+            'max_time': timedelta(minutes=120),
+            'max_time_wid': cycling_wid,
+            'max_distance': Decimal(66),
+            'max_distance_wid': cycling_wid,
+            'max_elevation': Decimal(430),
+            'max_elevation_wid': second_cycling_wid
         }
         # but we can get running stats too
@@ -719,4 +753,10 @@
             'distance': Decimal(5),
             'elevation': Decimal(0),
+            'max_time': timedelta(minutes=45),
+            'max_time_wid': running_wid,
+            'max_distance': Decimal(5),
+            'max_distance_wid': running_wid,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None,
         }
         # there are no running activities for 2016
@@ -726,4 +766,10 @@
             'distance': Decimal(0),
             'elevation': Decimal(0),
+            'max_time': timedelta(0),
+            'max_time_wid': None,
+            'max_distance': Decimal(0),
+            'max_distance_wid': None,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None
         }
         # and not activities for cycling in 2016 neither
@@ -733,4 +779,10 @@
             'distance': Decimal(0),
             'elevation': Decimal(0),
+            'max_time': timedelta(0),
+            'max_time_wid': None,
+            'max_distance': Decimal(0),
+            'max_distance_wid': None,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None
         }
         # and we can get the separate totals for cycling in different years
@@ -741,4 +793,10 @@
             'distance': Decimal(66),
             'elevation': Decimal(0),
+            'max_time': timedelta(minutes=120),
+            'max_time_wid': cycling_wid,
+            'max_distance': Decimal(66),
+            'max_distance_wid': cycling_wid,
+            'max_elevation': Decimal(0),
+            'max_elevation_wid': None
         }
         assert root['john'].sport_totals('cycling', 2017) == {
@@ -746,4 +804,10 @@
             'time': timedelta(minutes=60),
             'distance': Decimal(32),
-            'elevation': Decimal(0),
-        }
+            'elevation': Decimal(430),
+            'max_time': timedelta(minutes=60),
+            'max_time_wid': second_cycling_wid,
+            'max_distance': Decimal(32),
+            'max_distance_wid': second_cycling_wid,
+            'max_elevation': Decimal(430),
+            'max_elevation_wid': second_cycling_wid
+        }
