def test_parse_os(self): request = parse_request(fixtures.request_event) os = parse_os(request.os) self.assertIsInstance(os, Os) self.assertEqual(os.platform, "win") self.assertEqual(os.version, "6.1") self.assertEqual(os.sp, "") self.assertEqual(os.arch, "x64")
def test_parse_os(self): request = parse_request(fixtures.request_event) os = parse_os(request.os) self.assertIsInstance(os, Os) self.assertEqual(os.platform, 'win') self.assertEqual(os.version, '6.1') self.assertEqual(os.sp, '') self.assertEqual(os.arch, 'x64')
def test_parse_apps(self): request = parse_request(fixtures.request_event) req = parse_req(request) req.os = parse_os(request.os) req.hw = parse_hw(request.hw) if request.get("hw") else None req.save() apps = parse_apps(request.findall("app"), req) self.assertEqual(len(apps), 1) app = apps[0] self.assertIsInstance(app, AppRequest) self.assertEqual(app.version, None) self.assertEqual(app.nextversion, Request._meta.get_field_by_name("version")[0].to_python("13.0.782.112")) self.assertEqual(app.lang, "en") self.assertEqual(app.tag, None) self.assertEqual(app.installage, 6) self.assertEqual(app.appid, "{D0AB2EBC-931B-4013-9FEB-C9C4C2225C8C}")
def test_parse_apps(self): request = parse_request(fixtures.request_event) req = parse_req(request) req.os = parse_os(request.os) req.hw = parse_hw(request.hw) if request.get('hw') else None req.save() apps = parse_apps(request.findall('app'), req) self.assertEqual(len(apps), 1) app = apps[0] self.assertIsInstance(app, AppRequest) self.assertEqual(app.version, None) self.assertEqual(app.nextversion, Request._meta.get_field_by_name('version')[0].to_python('13.0.782.112')) self.assertEqual(app.lang, 'en') self.assertEqual(app.tag, None) self.assertEqual(app.installage, 6) self.assertEqual(app.appid, '{8A69D345-D564-463C-AFF1-A69D9E530F96}')
def test_parse_apps(self): request = parse_request(fixtures.request_event) req = parse_req(request) req.os = parse_os(request.os) req.hw = parse_hw(request.hw) if request.get('hw') else None req.save() apps = parse_apps(request.findall('app'), req) self.assertEqual(len(apps), 1) app = apps[0] self.assertIsInstance(app, AppRequest) self.assertEqual(app.version, None) self.assertEqual(app.nextversion, Request._meta.get_field_by_name('version')[0].to_python('13.0.782.112')) self.assertEqual(app.lang, 'en') self.assertEqual(app.tag, 'stable') self.assertEqual(app.installage, 6) self.assertEqual(app.appid, '{D0AB2EBC-931B-4013-9FEB-C9C4C2225C8C}')