def test_component_list(self): clist = ComponentList(name="TestCL", slug="testcl") clist.save() response = self.client.get(reverse("home")) self.assertContains(response, "TestCL") self.assertEqual(len(response.context["componentlists"]), 1)
def test_component_list(self): clist = ComponentList(name="TestCL", slug="testcl") clist.save() response = self.client.get(reverse('home')) self.assertContains(response, 'TestCL') self.assertEqual(len(response.context['componentlists']), 1)
def test_slug(self): """Test ComponentList slug.""" clist = ComponentList() clist.slug = "slug" self.assertEqual(clist.tab_slug(), "list-slug")
def test_can_be_imported(self): """Test that ComponentList model can be imported. Rather dumb test just to make sure there are no obvious parsing errors. """ ComponentList()
def test_slug(self): """Test ComponentList slug.""" clist = ComponentList() clist.slug = 'slug' self.assertEqual(clist.tab_slug(), 'list-slug')