bootstrap libraries added via cdn js & css script & link tags; some bootstrap styling added to base.html & list.html; unit tests updated to accomodate html parsing in assertContains() library fns (but n.b., not all unit tests have been updated to accomodate bootstrap attrs, so some still fail); all FTs currently passing from last commit

This commit is contained in:
Disco DeDisco
2026-01-03 20:05:41 -05:00
parent 8955d51474
commit 08305532c2
3 changed files with 45 additions and 11 deletions

View File

@@ -9,7 +9,11 @@ class HomePageTest(TestCase):
def test_renders_input_form(self):
response = self.client.get('/')
self.assertContains(response, '<form method="POST" action="/apps/dashboard/newlist">')
self.assertContains(response, '<input name="item_text"')
self.assertContains(
response,
'<input name="item_text" id="id-new-item" placeholder="Enter a to-do item" />',
html=True,
)
class ListAndItemModelsTest(TestCase):
def test_saving_and_retrieving_items(self):
@@ -52,7 +56,11 @@ class DashViewTest(TestCase):
response,
f'<form method="POST" action="/apps/dashboard/{mylist.id}/add-item">',
)
self.assertContains(response, '<input name="item_text"')
self.assertContains(
response,
'<input name="item_text" id="id-new-item" placeholder="Enter a to-do item" />',
html=True,
)
def test_displays_only_items_for_that_list(self):
# Given/Arrange