Beispiel #1
0
    def test_compatibility_check(self, run_validator):
        run_validator.return_value = json.dumps({
            'errors': 0,
            'success': True,
            'warnings': 0,
            'notices': 0,
            'message_tree': {},
            'messages': [],
            'metadata': {}
        })
        xpi = self.get_upload('extension.xpi')
        AppVersion.objects.create(application=amo.FIREFOX.id, version='10.0.*')

        compatibility_check(xpi, amo.FIREFOX.guid, '10.0.*')

        eq_(run_validator.call_args[1]['compat'], True)
    def test_compatibility_check(self, run_validator):
        run_validator.return_value = json.dumps({
            'errors': 0,
            'success': True,
            'warnings': 0,
            'notices': 0,
            'message_tree': {},
            'messages': [],
            'metadata': {}
        })
        xpi = self.get_upload('extension.xpi')
        AppVersion.objects.create(
            application=amo.FIREFOX.id,
            version='10.0.*')

        compatibility_check(xpi, amo.FIREFOX.guid, '10.0.*')

        eq_(run_validator.call_args[1]['compat'], True)
    def test_compatibility_check(self, run_validator):
        run_validator.return_value = json.dumps(
            {
                "errors": 0,
                "success": True,
                "warnings": 0,
                "notices": 0,
                "message_tree": {},
                "messages": [],
                "metadata": {},
            }
        )
        xpi = self.get_upload("extension.xpi")
        AppVersion.objects.create(application=Application.objects.get(guid=FIREFOX.guid), version="10.0.*")

        compatibility_check(xpi, FIREFOX.guid, "10.0.*")

        eq_(run_validator.call_args[1]["compat"], True)