Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_sftp.SFTPStorageTest test_accessed_time & test_modified_time assume EST timezone #1171

Closed
risicle opened this issue Aug 6, 2022 · 1 comment

Comments

@risicle
Copy link

risicle commented Aug 6, 2022

Hi,

It seems as though these tests assume a timezone of UTC-5, resulting in e.g.:

======================================================================
FAIL: test_accessed_time (tests.test_sftp.SFTPStorageTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/6v602p5l3c05iiq7jx8y0rjwiv2n8hhj-python3-3.9.13/lib/python3.9/unittest/mock.py", line 1336, in patched
    return func(*newargs, **newkeywargs)
  File "/build/django-storages-1.12.3/tests/test_sftp.py", line 121, in test_accessed_time
    self.assertEqual(self.storage.accessed_time('foo'),
AssertionError: datetime.datetime(2016, 7, 28, 2, 58, 4) != datetime.datetime(2016, 7, 27, 21, 58, 4)

======================================================================
FAIL: test_modified_time (tests.test_sftp.SFTPStorageTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/6v602p5l3c05iiq7jx8y0rjwiv2n8hhj-python3-3.9.13/lib/python3.9/unittest/mock.py", line 1336, in patched
    return func(*newargs, **newkeywargs)
  File "/build/django-storages-1.12.3/tests/test_sftp.py", line 128, in test_modified_time
    self.assertEqual(self.storage.modified_time('foo'),
AssertionError: datetime.datetime(2016, 7, 28, 2, 58, 4) != datetime.datetime(2016, 7, 27, 21, 58, 4)

----------------------------------------------------------------------

when it isn't.

@jschneier
Copy link
Owner

jschneier commented Aug 6, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants