django-smartagent
django-smartagent copied to clipboard
unittest failure in Django Project
When running unittests in a django project, with the following file: https://github.com/downloads/jamespacileo/django-smartagent/agents_2011_04_14.pkl from the following package: https://nodeload.github.com/jamespacileo/django-smartagent/tarball/master
the provided unittest fails with this message:
FAIL: test_user_agent_recognition (smartagent.tests.BrowserDetectionTest)
Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/smartagent/tests.py", line 17, in test_user_agent_recognition self.assertEqual(result['platform'], user_agent_meta['platform']) AssertionError: 'MacOSX' != 'iPhone OSX'
The unittest expects to detect 'iPhone OSX' from the following user-agent string: "Mozilla/5.0 (iPad; U; CPU OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5" And instead we detect 'MacOSX'