Exemplo n.º 1
0
 def test_unpublished_locations_are_not_shown(self):
     category = fixtures.get_category()
     fixtures.get_location(category=category, status=Location.DRAFT)
     eq_(list(Location.published.all()), [])
Exemplo n.º 2
0
 def test_get_image_url_is_empty(self):
     category = fixtures.get_category()
     instance = fixtures.get_location(category=category)
     eq_(instance.get_image_url(), '')
Exemplo n.º 3
0
 def test_published_locations_are_shown(self):
     category = fixtures.get_category()
     location = fixtures.get_location(
         category=category, status=Location.PUBLISHED)
     eq_(list(Location.published.all()), [location])
Exemplo n.º 4
0
 def test_get_image_url_is_from_category(self):
     category = fixtures.get_category(image='boo.png')
     instance = fixtures.get_location(category=category)
     eq_(instance.get_image_url(), '/media/boo.png')