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': {} }) upload = self.get_upload('extension.xpi') AppVersion.objects.create(application=amo.FIREFOX.id, version='10.0.*') compatibility_check(upload.pk, 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': {} }) upload = self.get_upload('extension.xpi') AppVersion.objects.create( application=amo.FIREFOX.id, version='10.0.*') compatibility_check(upload.pk, amo.FIREFOX.guid, '10.0.*') assert run_validator.call_args[1]['compat']