def test_get_ask_breadcrumbs_with_category(self): from ask_cfpb.models import get_ask_breadcrumbs test_category = mommy.make(Category, name='breadcrumb_cat') breadcrumbs = get_ask_breadcrumbs(test_category) self.assertEqual(len(breadcrumbs), 2) self.assertEqual(breadcrumbs[0]['title'], 'Ask CFPB') self.assertEqual(breadcrumbs[1]['title'], test_category.name)
def test_get_ask_breadcrumbs(self): from ask_cfpb.models import get_ask_breadcrumbs breadcrumbs = get_ask_breadcrumbs() self.assertEqual(len(breadcrumbs), 1) self.assertEqual(breadcrumbs[0]['title'], 'Ask CFPB')