From ac9b541a28cc1bb99fb79756f5b838266ebea2eb Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Thu, 17 Feb 2022 20:22:42 +0100 Subject: [PATCH] fix tests --- rowers/garmin_stuff.py | 7 +++---- rowers/tasks.py | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rowers/garmin_stuff.py b/rowers/garmin_stuff.py index 79d9820d..33575778 100644 --- a/rowers/garmin_stuff.py +++ b/rowers/garmin_stuff.py @@ -479,8 +479,8 @@ def garmin_getworkout(garminid, r, activity): utc_offset = datetime.timedelta(seconds=offset) now = datetime.datetime.now(pytz.utc) - zones = [ttz.zone for ttz in map(pytz.timezone, pytz.all_timezones_set) - if now.astimezone(tz).utcoffset() == utc_offset] + zones = [ttz.zone for ttz in map( + pytz.timezone, pytz.all_timezones_set) if now.astimezone(ttz).utcoffset() == utc_offset] if r.defaulttimezone in zones: # pragma: no cover thetimezone = r.defaulttimezone elif len(zones): @@ -494,8 +494,7 @@ def garmin_getworkout(garminid, r, activity): day=startdatetime.day, hour=startdatetime.hour, minute=startdatetime.minute, - second=startdatetime.second, - ).astimezone(pytz.timezone(thetimezone)) + second=startdatetime.second,).astimezone(pytz.timezone(thetimezone)) w.startdatetime = startdatetime w.starttime = w.startdatetime.time() diff --git a/rowers/tasks.py b/rowers/tasks.py index f39f0abe..e7c2c299 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -503,8 +503,9 @@ def getagegrouprecord(age, sex='male', weightcategory='hwt', def polygon_to_path(polygon, debug=True): pid = polygon[0] - query = "SELECT id, latitude, longitude FROM rowers_geopoint WHERE polygon_id = {pid}'\ - ' ORDER BY order_in_poly ASC".format(pid=pid) + query = "SELECT id, latitude, longitude FROM rowers_geopoint WHERE polygon_id = {pid}"\ + " ORDER BY order_in_poly ASC".format( + pid=pid) if debug: engine = create_engine(database_url_debug, echo=False) else: # pragma: no cover