From feb61efd6a215a6fb76ac702375b5b1c6b2ccd5d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 3 Jul 2021 16:59:00 +0100 Subject: [PATCH] Tidying --- tests.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/tests.py b/tests.py index 9496820ac..c6ac118db 100644 --- a/tests.py +++ b/tests.py @@ -3951,9 +3951,8 @@ def _testSpoofGeolocation() -> None: hourStr = str(hour) if hour < 10: hourStr = '0' + hourStr - currTime = datetime.datetime.strptime("2021-05-" + str(dayNumber) + - " " + hourStr + ":14", - "%Y-%m-%d %H:%M") + dateTimeStr = "2021-05-" + str(dayNumber) + " " + hourStr + ":14" + currTime = datetime.datetime.strptime(dateTimeStr, "%Y-%m-%d %H:%M") coords = spoofGeolocation('', 'new york, usa', currTime, decoySeed, citiesList, nogoList) longitude = coords[1] @@ -3989,9 +3988,8 @@ def _testSpoofGeolocation() -> None: hourStr = str(hour) if hour < 10: hourStr = '0' + hourStr - currTime = datetime.datetime.strptime("2021-05-" + str(dayNumber) + - " " + hourStr + ":14", - "%Y-%m-%d %H:%M") + dateTimeStr = "2021-05-" + str(dayNumber) + " " + hourStr + ":14" + currTime = datetime.datetime.strptime(dateTimeStr, "%Y-%m-%d %H:%M") coords = spoofGeolocation('', 'london, england', currTime, decoySeed, citiesList, nogoList) longitude = coords[1] @@ -4040,9 +4038,8 @@ def _testSpoofGeolocation() -> None: hourStr = str(hour) if hour < 10: hourStr = '0' + hourStr - currTime = datetime.datetime.strptime("2021-05-" + str(dayNumber) + - " " + hourStr + ":14", - "%Y-%m-%d %H:%M") + dateTimeStr = "2021-05-" + str(dayNumber) + " " + hourStr + ":14" + currTime = datetime.datetime.strptime(dateTimeStr, "%Y-%m-%d %H:%M") coords = spoofGeolocation('', 'SAN FRANCISCO, USA', currTime, decoySeed, citiesList, nogoList) longitude = coords[1] @@ -4095,9 +4092,8 @@ def _testSpoofGeolocation() -> None: hourStr = str(hour) if hour < 10: hourStr = '0' + hourStr - currTime = datetime.datetime.strptime("2021-05-" + str(dayNumber) + - " " + hourStr + ":14", - "%Y-%m-%d %H:%M") + dateTimeStr = "2021-05-" + str(dayNumber) + " " + hourStr + ":14" + currTime = datetime.datetime.strptime(dateTimeStr, "%Y-%m-%d %H:%M") coords = spoofGeolocation('', 'SEATTLE, USA', currTime, decoySeed, citiesList, nogoList) longitude = coords[1]