Closed Bug 847752 Opened 11 years ago Closed 11 years ago

[traceback] parse_ua doesn't parse macintosh platform correctly or test is wrong

Categories

(Input Graveyard :: Submission, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

Details

FAIL: fjord.base.tests.test_browser:TestUserAgentDetection.test_parse_ua
  vim +35 fjord/base/tests/test_browser.py  # test_parse_ua
    self.check_ua(case)
  vim +26 fjord/base/tests/test_browser.py  # check_ua
    assert parsed == expected, msg
AssertionError: UA Detection failed. UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:20.0) Gecko/20130208 Firefox/20.0", parsed="Browser(browser='Firefox', browser_version=u'20.0.0', platform=u'Macintosh', platform_version=None, mobile=False)" expected="(u'Firefox', u'20.0.0', u'OS X', u'10.7', False)"

Either the parser isn't getting this case right or the test is wrong. I don't have time to look into it now, so I'm creating a bug and having it block on bug #832316.
Ricky says his UA is:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20130304 Firefox/21.0

So, I think the parser has a bug. It should see that and identify it as OSX--not as Macintosh.

Grabbing this to work on right now.
Assignee: nobody → willkg
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.