コード例 #1
0
    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}")
コード例 #2
0
    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}')
コード例 #3
0
    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}')
コード例 #4
0
    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}')