Skip to content

Commit

Permalink
test new test
Browse files Browse the repository at this point in the history
  • Loading branch information
evemartin committed May 15, 2024
1 parent fe499bc commit 197176a
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions game/tests/test_level_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,21 +377,19 @@ def test_level_saving_with_multiple_houses(self):
new_level = Level.objects.get(name="multiple_houses")
assert new_level.destinations == "[[3,4],[3,3]]"

def test_level_loading_with_multiple_houses(self):

email1, password1 = signup_teacher_directly()

teacher1 = Teacher.objects.get(new_user__email=email1)

self.login(email1, password1)
level = create_save_level_with_multiple_houses(teacher1)
url = reverse("load_level_for_editor", kwargs={"levelID": level.id})
response = self.client.get(url)

# email1, password1 = signup_teacher_directly()

# teacher1 = Teacher.objects.get(new_user__email=email1)

# self.login(email1, password1)
# level = create_save_level_with_multiple_houses(teacher1)
# url = reverse("load_level_for_editor", kwargs={"levelID": level.id})
# response = self.client.get(url)

# assert response.status_code == 200
# assert response.content.
assert response.status_code == 200
assert response["level"]["destinations"] == "[[3,4],[3,3]]"

def test_level_of_anonymised_teacher_is_hidden(self):
# Create 2 teacher accounts
Expand Down

0 comments on commit 197176a

Please sign in to comment.