From bcdb0d07574575c079fb7b15ab3898e6a020b2b3 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Fri, 2 Jun 2023 10:50:25 +0100 Subject: [PATCH] Update tests with button count --- ynr/apps/people/tests/test_person_view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ynr/apps/people/tests/test_person_view.py b/ynr/apps/people/tests/test_person_view.py index 61e0aa3cb..eedef454f 100644 --- a/ynr/apps/people/tests/test_person_view.py +++ b/ynr/apps/people/tests/test_person_view.py @@ -69,13 +69,13 @@ def test_get_non_existent(self): def test_shows_no_edit_buttons_if_user_not_authenticated(self): response = self.app.get("/person/2009/tessa-jowell") edit_buttons = response.html.find_all("a", attrs={"class": "button"}) - self.assertEqual(len(edit_buttons), 2) + self.assertEqual(len(edit_buttons), 1) self.assertEqual(edit_buttons[0].string, "Log in to edit") def test_shows_edit_buttons_if_user_authenticated(self): response = self.app.get("/person/2009/tessa-jowell", user=self.user) edit_buttons = response.html.find_all("a", attrs={"class": "button"}) - self.assertEqual(len(edit_buttons), 3) + self.assertEqual(len(edit_buttons), 2) def test_links_to_person_edit_page(self): response = self.app.get("/person/2009/tessa-jowell", user=self.user)