fix tests
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user