7.5 Taking a First, Self-Contained Step: One New URL
parent
e59776035b
commit
153e36c790
|
@ -43,6 +43,16 @@ class HomePageTest(TestCase):
|
||||||
self.assertIn('itemey 1', response.content.decode())
|
self.assertIn('itemey 1', response.content.decode())
|
||||||
self.assertIn('itemey 2', response.content.decode())
|
self.assertIn('itemey 2', response.content.decode())
|
||||||
|
|
||||||
|
class ListViewTest(TestCase):
|
||||||
|
|
||||||
|
def test_displays_all_items(self):
|
||||||
|
Item.objects.create(text="itemey 1")
|
||||||
|
Item.objects.create(text="itemey 2")
|
||||||
|
|
||||||
|
response = self.client.get('/lists/the-only-list-in-the-world')
|
||||||
|
|
||||||
|
self.assertIn('itemey 1', response.content.decode())
|
||||||
|
self.assertIn('itemey 2', response.content.decode())
|
||||||
|
|
||||||
class ItemModelTest(TestCase):
|
class ItemModelTest(TestCase):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue