Beispiel #1
0
 def test_featured_page_is_swapped(self):
     fixtures.get_page(
         name='Awesome apps', status=models.Page.FEATURED)
     new_page = fixtures.get_page(
         name='Gigabit apps', status=models.Page.FEATURED)
     eq_(models.Page.objects.get(status=models.Page.FEATURED),
         new_page)
Beispiel #2
0
 def test_page_item_is_created_successfully(self):
     user = get_user('app-maker')
     application = fixtures.get_application(owner=user)
     page = fixtures.get_page(name='Awesome apps')
     data = {
         'application': application,
         'page': page,
     }
     instance = models.PageApplication.objects.create(**data)
     ok_(instance.id)
     eq_(instance.application, application)
     eq_(instance.page, page)
     eq_(instance.order, 0)
Beispiel #3
0
 def test_get_absolute_url_published(self):
     page = fixtures.get_page(
         name='older', status=models.Page.PUBLISHED)
     eq_(page.get_absolute_url(), '/apps/featured/archive/older/')
Beispiel #4
0
 def test_get_absolute_url_featured(self):
     page = fixtures.get_page(
         name='Awesome apps', status=models.Page.FEATURED)
     eq_(page.get_absolute_url(), '/apps/featured/')
Beispiel #5
0
 def test_is_featured_property(self):
     page = fixtures.get_page(
         name='Awesome apps', status=models.Page.FEATURED)
     eq_(page.is_featured(), True)