Skip to content

Instantly share code, notes, and snippets.

@JirkaChadima
Created June 13, 2012 16:54
Show Gist options
  • Save JirkaChadima/2925237 to your computer and use it in GitHub Desktop.
Save JirkaChadima/2925237 to your computer and use it in GitHub Desktop.
Test for discovering an infinite loop (https://github.com/ella/ella/issues/101)
class TestNestedListing(TestCase):
def setUp(self):
super(TestNestedListing, self).setUp()
create_basic_categories(self)
create_and_place_a_publishable(self)
create_and_place_more_publishables(self)
list_all_publishables_in_category_by_hour(self, category=self.category_nested_second)
list_all_publishables_in_category_by_hour(self, category=self.category_nested)
def test_get_listing_with_all_children_in_nested_category(self):
l = Listing.objects.get_listing(category=self.category_nested, children=ListingHandler.ALL)
tools.assert_equals(self.listings, list(l))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment