mirror of https://github.com/snachodog/mybuddy.git
Add views tests for recently added models
This commit is contained in:
parent
db5615fcb9
commit
fa746c68ca
|
@ -29,6 +29,18 @@ class ViewsTestCase(TestCase):
|
|||
|
||||
cls.c.login(**cls.credentials)
|
||||
|
||||
def test_bmi_views(self):
|
||||
page = self.c.get("/bmi/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
page = self.c.get("/bmi/add/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
||||
entry = models.BMI.objects.first()
|
||||
page = self.c.get("/bmi/{}/".format(entry.id))
|
||||
self.assertEqual(page.status_code, 200)
|
||||
page = self.c.get("/bmi/{}/delete/".format(entry.id))
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
||||
def test_child_views(self):
|
||||
page = self.c.get("/children/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
@ -73,6 +85,30 @@ class ViewsTestCase(TestCase):
|
|||
page = self.c.get("/feedings/{}/delete/".format(entry.id))
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
||||
def test_headcircumference_views(self):
|
||||
page = self.c.get("/head-circumference/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
page = self.c.get("/head-circumference/add/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
||||
entry = models.HeadCircumference.objects.first()
|
||||
page = self.c.get("/head-circumference/{}/".format(entry.id))
|
||||
self.assertEqual(page.status_code, 200)
|
||||
page = self.c.get("/head-circumference/{}/delete/".format(entry.id))
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
||||
def test_height_views(self):
|
||||
page = self.c.get("/height/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
page = self.c.get("/height/add/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
||||
entry = models.Height.objects.first()
|
||||
page = self.c.get("/height/{}/".format(entry.id))
|
||||
self.assertEqual(page.status_code, 200)
|
||||
page = self.c.get("/height/{}/delete/".format(entry.id))
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
||||
def test_note_views(self):
|
||||
page = self.c.get("/notes/")
|
||||
self.assertEqual(page.status_code, 200)
|
||||
|
|
Loading…
Reference in New Issue