Пример #1
0
 def test_binary_flag_set_on_addon_for_binary_extensions(self):
     results = {
         'errors': 0,
         'success': True,
         'warnings': 0,
         'notices': 0,
         'message_tree': {},
         'messages': [],
         'metadata': {
             'contains_binary_extension': True,
             'version': '1.0',
             'name': 'gK0Bes Bot',
             'id': 'gkobes@gkobes',
         },
     }
     self.addon = addon_factory()
     self.file = self.addon.current_version.all_files[0]
     assert not self.addon.binary
     tasks.handle_file_validation_result(results, self.file.pk)
     self.addon = Addon.objects.get(pk=self.addon.pk)
     assert self.addon.binary
Пример #2
0
 def test_binary_flag_set_on_addon_for_binary_extensions(self):
     results = {
         "errors": 0,
         "success": True,
         "warnings": 0,
         "notices": 0,
         "message_tree": {},
         "messages": [],
         "metadata": {
             "contains_binary_extension": True,
             "version": "1.0",
             "name": "gK0Bes Bot",
             "id": "gkobes@gkobes"
         }
     }
     self.addon = addon_factory()
     self.file = self.addon.current_version.all_files[0]
     assert not self.addon.binary
     tasks.handle_file_validation_result(results, self.file.pk)
     self.addon = Addon.objects.get(pk=self.addon.pk)
     assert self.addon.binary