def test_bulk(self):
     label = self.project.label_set.create(name="test", color="navy")
     self.assertTrue(BulkEditAddon.can_install(self.component, None))
     addon = BulkEditAddon.create(
         self.component,
         configuration={
             "q": "state:translated",
             "state": -1,
             "add_labels": ["test"],
             "remove_labels": [],
             "add_flags": "",
             "remove_flags": "",
         },
     )
     addon.component_update(self.component)
     self.assertEqual(label.unit_set.count(), 1)
Exemple #2
0
 def test_bulk(self):
     label = self.project.label_set.create(name='test', color="navy")
     self.assertTrue(BulkEditAddon.can_install(self.component, None))
     addon = BulkEditAddon.create(
         self.component,
         configuration={
             'q': 'state:translated',
             'state': -1,
             'add_labels': ['test'],
             'remove_labels': [],
             'add_flags': '',
             'remove_flags': '',
         },
     )
     addon.component_update(self.component)
     self.assertEqual(label.unit_set.count(), 4)