Skip to content

Commit

Permalink
remove unused code, add test for ten year map page
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed Jul 16, 2024
1 parent 3605ca4 commit 89b4b8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
6 changes: 6 additions & 0 deletions portal/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,12 @@ def test_contributor(self):
response = c.get(page_url)
assert response.status_code == 200

def test_ten_year_map(self):
c = Client()
page_url = reverse("tenYears")
response = c.get(page_url)
assert response.status_code == 200

def test_student_dashboard_view(self):
teacher_email, teacher_password = signup_teacher_directly()
create_organisation_directly(teacher_email)
Expand Down
22 changes: 0 additions & 22 deletions portal/views/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,6 @@
LOGGER = logging.getLogger(__name__)


def teach_email_labeller(request):
if request.method == "POST" and "teacher_login" in request.POST:
return request.POST["login-teacher_email"]

return ""


def play_name_labeller(request):
if request.method == "POST":
if "school_login" in request.POST:
return (
request.POST["login-name"]
+ ":"
+ request.POST["login-access_code"]
)

if "independent_student_login" in request.POST:
return request.POST["independent_student-username"]

return ""


def register_view(request):
if request.user.is_authenticated:
return redirect_user_to_dashboard(request)
Expand Down

0 comments on commit 89b4b8b

Please sign in to comment.