add an about page (and some mroe tests)
This commit is contained in:
@@ -334,3 +334,31 @@ def test_supervisor_management(db, faker, client, create_cid_manager, django_use
|
||||
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
assert len(soup.find(id="supervisor-list").find_all("li")) == 1
|
||||
|
||||
response = client.post(reverse(f"generic:supervisor_create"), {"email":faker.email(), "name": faker.name()})
|
||||
assert response.status_code == 302
|
||||
|
||||
response = client.get(reverse(f"generic:supervisor"))
|
||||
assert response.status_code == 200
|
||||
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
assert len(soup.find(id="supervisor-list").find_all("li")) == 2
|
||||
|
||||
|
||||
def test_privacy(db, client):
|
||||
response = client.get(reverse(f"privacy"))
|
||||
assert response.status_code == 200
|
||||
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
assert "Privacy Policy" in soup.find("h1").text
|
||||
|
||||
def test_cookies(db, client):
|
||||
response = client.get(reverse(f"cookie_consent_cookie_group_list"))
|
||||
assert response.status_code == 200
|
||||
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
assert "Cookies" in soup.find("h1").text
|
||||
|
||||
# Check our 2 cookies are displayed (we would have to add them for this to work)
|
||||
#assert "csrftoken" in [i.text for i in soup.find_all("th")]
|
||||
#assert "sessionid" in [i.text for i in soup.find_all("th")]
|
||||
Reference in New Issue
Block a user