diff --git a/game/tests/test_level_editor.py b/game/tests/test_level_editor.py index 6bee87db1..dfe861596 100644 --- a/game/tests/test_level_editor.py +++ b/game/tests/test_level_editor.py @@ -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