vishnevskiy / battlenet

Python Library for Blizzard's Community Platform API
http://guildwork.com
MIT License
61 stars 27 forks source link

Test failure in test_character.py: Mismatching achievement dates? #14

Open paca-project opened 13 years ago

paca-project commented 13 years ago

Test failure in test_character.py: Mismatching achievement dates?

File "test_character.py", line 104, in test_achievements self.assertEqual(character.achievements[513], datetime.datetime(2011, 1, 25, 12, 22, 8)) AssertionError: datetime.datetime(2011, 1, 25, 15, 22, 8) != datetime.datetime(2011, 1, 25, 12, 22, 8)

paca-project commented 13 years ago

According to the comments by Crote in the following thread this is a bug in the test case, not the library: https://github.com/vishnevskiy/battlenet/commit/5394d648c4562a711f21720499fb12ebfaf2de1d

Perhaps the test case needs to adjust for varying time zones (convert everything to GMT?) before comparing?

Crote commented 13 years ago

As stated by http://www.wowpedia.org/Server:Nazjatar_US , the server used runs in the Pacific time zone. The -7h offset in the Armory timestamp, which happens to be in GMT, fits in nicely with the -7 offset for PDT.