test that categories are ordered as expected

This commit is contained in:
Bruno Binet 2012-04-23 23:29:00 +02:00
commit 1efda9eb74

View file

@ -46,3 +46,7 @@ class TestArticlesGenerator(unittest.TestCase):
elif relfilepath == "article_without_category.rst":
self.assertEquals(article.category.name, 'Default')
categories = [cat.name for cat, _ in generator.categories]
# assert that the categories are ordered as expected
self.assertEquals(
categories, ['Default', 'TestCategory', 'Yeah', 'yeah'])