

def test_unicode_strings(self):
    try:
        unicode_ua_str = unicode(devices['iphone']['user_agent'])
        self.assertEqual(unicode_ua_str, 'iPhone / iOS 5.1 / Mobile Safari 5.1')
        self.assertTrue(isinstance(unicode_ua_str, unicode))
    except NameError:
        unicode_ua_str = str(devices['iphone']['user_agent'])
        self.assertEqual(unicode_ua_str, 'iPhone / iOS 5.1 / Mobile Safari 5.1')

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