From 86d22c59847871f2e01baec0ff88e37a725b060d Mon Sep 17 00:00:00 2001 From: lucasmarchd01 Date: Fri, 23 Aug 2024 18:57:40 +0000 Subject: [PATCH] test(source): fix failing tests in SourceEditViewTest and SourceCreateViewTest - add holding institution required field --- django/cantusdb_project/main_app/tests/test_views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/django/cantusdb_project/main_app/tests/test_views.py b/django/cantusdb_project/main_app/tests/test_views.py index ae156bede..f4e8aa7e3 100644 --- a/django/cantusdb_project/main_app/tests/test_views.py +++ b/django/cantusdb_project/main_app/tests/test_views.py @@ -4679,10 +4679,12 @@ def test_url_and_templates(self): self.assertTemplateUsed(response, "source_create.html") def test_create_source(self): + hinst = make_fake_institution(siglum="FA-Ke") response = self.client.post( reverse("source-create"), { "shelfmark": "test-shelfmark", # shelfmark is a required field + "holding_institution": hinst.id, # holding institution is a required field }, ) @@ -4729,11 +4731,13 @@ def test_url_and_templates(self): def test_edit_source(self): source = make_fake_source() + hinst = make_fake_institution(siglum="FA-Ke") response = self.client.post( reverse("source-edit", args=[source.id]), { "shelfmark": "test-shelfmark", # shelfmark is a required field, + "holding_institution": hinst.id, # holding institution is a required field }, )