Exemplo n.º 1
0
    def test_categories_addons_generation(self):
        data = generate_categories(APPS['android'], ADDON_EXTENSION)
        assert len(data) == Category.objects.all().count()
        assert len(data) == 11

        category = Category.objects.get(
            id=CATEGORIES[APPS['android'].id][ADDON_EXTENSION]['shopping'].id)
        assert str(category.name) == u'Shopping'

        # Re-generating should not create any more.
        data = generate_categories(APPS['android'], ADDON_EXTENSION)
        assert len(data) == Category.objects.all().count()
        assert len(data) == 11

        # Name should still be the same.
        category = Category.objects.get(
            id=CATEGORIES[APPS['android'].id][ADDON_EXTENSION]['shopping'].id)
        assert str(category.name) == u'Shopping'
Exemplo n.º 2
0
    def test_categories_addons_generation(self):
        data = generate_categories(APPS['android'], ADDON_EXTENSION)
        assert len(data) == Category.objects.all().count()
        assert len(data) == 11

        category = Category.objects.get(
            id=CATEGORIES[APPS['android'].id][ADDON_EXTENSION]['shopping'].id)
        assert unicode(category.name) == u'Shopping'

        # Re-generating should not create any more.
        data = generate_categories(APPS['android'], ADDON_EXTENSION)
        assert len(data) == Category.objects.all().count()
        assert len(data) == 11

        # Name should still be the same.
        category = Category.objects.get(
            id=CATEGORIES[APPS['android'].id][ADDON_EXTENSION]['shopping'].id)
        assert unicode(category.name) == u'Shopping'
Exemplo n.º 3
0
 def test_categories_themes_generation(self):
     data = generate_categories(APPS['firefox'], ADDON_PERSONA)
     assert len(data) == Category.objects.all().count()
     assert len(data) == 15
Exemplo n.º 4
0
 def test_categories_themes_generation(self):
     data = generate_categories()
     assert len(data) == Category.objects.all().count()
     assert len(data) == 15
Exemplo n.º 5
0
 def test_categories_addons_translations(self):
     with self.activate(locale='es'):
         data = generate_categories(APPS['android'])
         assert unicode(data[0].name).startswith(u'(español) ')
Exemplo n.º 6
0
 def test_categories_addons_generation(self):
     data = generate_categories(APPS['android'])
     assert len(data) == Category.objects.all().count()
     assert len(data) == 10
Exemplo n.º 7
0
 def test_categories_themes_generation(self):
     data = generate_categories(APPS['firefox'], ADDON_PERSONA)
     assert len(data) == Category.objects.all().count()
     assert len(data) == 15
Exemplo n.º 8
0
 def test_categories_addons_generation(self):
     data = generate_categories(APPS['android'])
     eq_(len(data), Category.objects.all().count())
     eq_(len(data), 10)
Exemplo n.º 9
0
 def test_categories_addons_translations(self):
     with self.activate(locale='es'):
         data = generate_categories(APPS['android'])
         ok_(unicode(data[0].name).startswith(u'(español) '))
 def test_categories_addons_translations(self):
     with self.activate(locale="es"):
         data = generate_categories(APPS["android"])
         ok_(unicode(data[0].name).startswith(u"(español) "))
Exemplo n.º 11
0
 def test_categories_themes_generation(self):
     data = generate_categories()
     eq_(len(data), Category.objects.all().count())
     eq_(len(data), 15)
 def test_categories_addons_generation(self):
     data = generate_categories(APPS["android"])
     eq_(len(data), Category.objects.all().count())
     eq_(len(data), 10)
 def test_categories_themes_generation(self):
     data = generate_categories()
     eq_(len(data), Category.objects.all().count())
     eq_(len(data), 15)
Exemplo n.º 14
0
 def test_categories_themes_generation(self):
     data = generate_categories()
     assert len(data) == Category.objects.all().count()
     assert len(data) == 15
Exemplo n.º 15
0
 def test_categories_addons_generation(self):
     data = generate_categories(APPS['android'])
     assert len(data) == Category.objects.all().count()
     assert len(data) == 10
Exemplo n.º 16
0
 def test_categories_themes_translations(self):
     with self.activate(locale='es'):
         data = generate_categories()
         assert unicode(data[0].name).startswith(u'(español) ')