diff --git a/rad/urls.py b/rad/urls.py index db75605e..8599b2a0 100644 --- a/rad/urls.py +++ b/rad/urls.py @@ -158,6 +158,7 @@ urlpatterns = [ path("cookies/", include("cookie_consent.urls")), #path("cookies/", include("cookie_consent.urls")), path("privacy/", views.privacy_view, name="privacy"), + path("about/", views.about_view, name="about"), # path('select2/', include('select2.urls')), *HTMXAutoComplete.url_dispatcher('ac'), ] diff --git a/rad/views.py b/rad/views.py index 3c3b343e..957e13d3 100644 --- a/rad/views.py +++ b/rad/views.py @@ -506,6 +506,8 @@ def view_feedback(request): def privacy_view(request): return render(request, "privacy.html") +def about_view(request): + return render(request, "about.html") # HTTP Error 400 def page_not_found(request, exception): diff --git a/rapids/tests/test_urls.py b/rapids/tests/test_urls.py index 304a41dd..137f41f1 100644 --- a/rapids/tests/test_urls.py +++ b/rapids/tests/test_urls.py @@ -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")] \ No newline at end of file diff --git a/templates/about.html b/templates/about.html new file mode 100644 index 00000000..41c1a333 --- /dev/null +++ b/templates/about.html @@ -0,0 +1,11 @@ +{% extends 'base.html' %} + +{% block content %} +
Developed for / as part of the Peninsula Radiology Academy.
+ + +