

def test_user_agent_object_assignments(self):
    ua_dict = user_agent_parser.Parse(devices['iphone']['ua_string'])
    iphone_ua = devices['iphone']['user_agent']
    self.assertEqual(iphone_ua.browser.family, ua_dict['user_agent']['family'])
    self.assertEqual(iphone_ua.browser.version, (int(ua_dict['user_agent']['major']), int(ua_dict['user_agent']['minor'])))
    self.assertEqual(iphone_ua.os.family, ua_dict['os']['family'])
    self.assertEqual(iphone_ua.os.version, (int(ua_dict['os']['major']), int(ua_dict['os']['minor'])))
    self.assertEqual(iphone_ua.device.family, ua_dict['device']['family'])

dataset/ETHPy150Open selwin/python-user-agents/user_agents/tests.py UserAgentsTest.test_user_agent_object_assignments/original