From: Caio Carvalho <21188280+lowercase00@users.noreply.github.com> Date: Tue, 3 May 2022 16:18:34 +0000 (-0300) Subject: Add timezone to epoch tests X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1028%2Fhead;p=thirdparty%2Fsqlalchemy%2Falembic.git Add timezone to epoch tests --- diff --git a/tests/test_script_production.py b/tests/test_script_production.py index fe0b3a76..91c8a912 100644 --- a/tests/test_script_production.py +++ b/tests/test_script_production.py @@ -193,13 +193,13 @@ class ScriptNamingTest(TestBase): "%(day)s_%(hour)s_" "%(minute)s_%(second)s", ) - create_date = datetime.datetime(2012, 7, 25, 15, 8, 5) + create_date = datetime.datetime(2012, 7, 25, 15, 8, 5, tzinfo=tz.gettz("UTC")) eq_( script._rev_path( script.versions, "12345", "this is a message", create_date ), os.path.abspath( - "%s/versions/1343239685_12345_this_is_a_" + "%s/versions/1343228885_12345_this_is_a_" "message_2012_7_25_15_8_5.py" % _get_staging_directory() ), ) @@ -212,13 +212,13 @@ class ScriptNamingTest(TestBase): "%(day)s_%(hour)s_" "%(minute)s_%(second)s", ) - create_date = datetime.datetime(2012, 7, 25, 15, 8, 6) + create_date = datetime.datetime(2012, 7, 25, 15, 8, 6, tzinfo=tz.gettz("UTC")) eq_( script._rev_path( script.versions, "12345", "this is a message", create_date ), os.path.abspath( - "%s/versions/1343239686_12345_this_is_a_" + "%s/versions/1343228886_12345_this_is_a_" "message_2012_7_25_15_8_6.py" % _get_staging_directory() ), )