def test_new_category(self): app_id = 424184 # `complete=True` adds the 'utilities' category. app = app_factory(id=app_id, name='second', status=mkt.STATUS_PUBLIC, complete=True) adjust_categories([app_id]) self.assertSetEqual(app.reload().categories, ['food-drink', 'health-fitness'])
def test_adjust_single_category(self): self.app.categories = ['news-weather'] self.app.save() adjust_categories([self.app.pk]) eq_(self.app.reload().categories, ['news'])
def test_adjust_double_category(self): self.app.categories = ['news-weather', 'social'] self.app.save() adjust_categories([self.app.pk]) self.assertSetEqual(self.app.reload().categories, ['news', 'social'])
def test_adjust_double_category(self): self.app.categories = ["news-weather", "social"] self.app.save() adjust_categories([self.app.pk]) self.assertSetEqual(self.app.reload().categories, ["news", "social"])