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()), [])
def test_get_image_url_is_empty(self): category = fixtures.get_category() instance = fixtures.get_location(category=category) eq_(instance.get_image_url(), '')
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])
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')