Exemple #1
0
 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'])
Exemple #2
0
 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'])
Exemple #3
0
 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'])
Exemple #4
0
 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"])