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

unittest failure in Django Project #9

Open
ygbourhis opened this issue May 15, 2012 · 0 comments
Open

unittest failure in Django Project #9

ygbourhis opened this issue May 15, 2012 · 0 comments

Comments

@ygbourhis
Copy link

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'

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

1 participant