]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Add timezone to epoch tests 1028/head
authorCaio Carvalho <21188280+lowercase00@users.noreply.github.com>
Tue, 3 May 2022 16:18:34 +0000 (13:18 -0300)
committerCaio Carvalho <21188280+lowercase00@users.noreply.github.com>
Tue, 3 May 2022 16:18:34 +0000 (13:18 -0300)
tests/test_script_production.py

index fe0b3a766423cf114cfd9b6dd1cc588d9c669180..91c8a912cfef64b5e7545ad8347185274219ba5b 100644 (file)
@@ -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()
             ),
         )