vishnevskiy / battlenet

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

Changes to enable the library to mostly work in Google App Engine #10

Closed paca-project closed 13 years ago

paca-project commented 13 years ago

These are changes to enable the library to mostly work in Google App Engine (GAE).

GAE uses Python 2.5 and and there are some issues to be worked around

  1. A bug in 2.5 (the import of * fails in init.py, so you have to manually import each item.
  2. unittest had many features added in 2.7 so you have to import unittest2 as unittest if python is pre-2.7.
  3. eventlet doesn't exist for GAE so those tests are excluded if the eventlet library fails to import.

Even with these changes there is still an issue with collections.namedtuple as that wasn't introduced until Python 2.6 so that test fails. Perhaps this needs to be changed in the library to support 2.5?

There are other failures that are visible in Python 2.7 as well as 2.5. These seem to be general errors that happen regardless of whether or not they are running in Google App Engine or not.

python2.7 test_data.py (500 internal server error) (diff is 1768 character long ... self.maxDiff) python2.7 test_character.py (CharacterNotFound) (AssertionError: datetime.datetime(2011, 1, 25, 15, 22, 8) != datetime.datetime(2011, 1, 25, 12, 22, 8)) (AssertionError: u'Archaeology' != 'First Aid')

Thanks again for the library!

vishnevskiy commented 13 years ago

Thanks, I will merge this when I can.