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)