def test_reverse(self): File.objects.update(no_restart=True, jetpack_version='1.0') cron.tag_jetpacks() eq_(['jetpack', 'restartless'], sorted([t.tag_text for t in self.addon.tags.all()])) File.objects.update(no_restart=False, jetpack_version=None) cron.tag_jetpacks() eq_([], [t.tag_text for t in self.addon.tags.all()])
def test_no_change(self): File.objects.update(no_restart=False, jetpack=False) cron.tag_jetpacks() eq_([], [t.tag_text for t in self.addon.tags.all()])
def test_restartless(self): File.objects.update(no_restart=True) cron.tag_jetpacks() eq_(['restartless'], [t.tag_text for t in self.addon.tags.all()])
def test_jetpack(self): File.objects.update(jetpack=True) cron.tag_jetpacks() eq_(['jetpack'], [t.tag_text for t in self.addon.tags.all()])