From a06867aaf8e3e3a5342286231492120dd3c168f0 Mon Sep 17 00:00:00 2001 From: arallaer Date: Wed, 13 Mar 2024 20:45:20 +0100 Subject: [PATCH] data nodig voor de testen --- .gitignore | 3 ++- api/tests/serializers/test_project.py | 4 ++-- api/tests/testdata/test.txt | 1 + api/urls.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 api/tests/testdata/test.txt diff --git a/.gitignore b/.gitignore index 0ed25f64..f29b818d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ venv migrations .env htmlcov -data \ No newline at end of file +data +uploads \ No newline at end of file diff --git a/api/tests/serializers/test_project.py b/api/tests/serializers/test_project.py index d06e2148..4953c05f 100644 --- a/api/tests/serializers/test_project.py +++ b/api/tests/serializers/test_project.py @@ -69,7 +69,7 @@ def test_validation_for_blank_items(self): def test_create(self): vak = VakFactory.create().vak_id - with open("api/tests/data/test.txt", "rb") as fp: + with open("api/tests/testdata/test.txt", "rb") as fp: data = { "titel": "test project", "beschrijving": "Dit is een test project.", @@ -84,7 +84,7 @@ def test_create(self): self.assertEqual(project.deadline, parse(data["deadline"])) def test_update(self): - with open("api/tests/data/test.txt", "rb") as fp: + with open("api/tests/testdata/test.txt", "rb") as fp: data = { "titel": "test project", "beschrijving": "Dit is een test project.", diff --git a/api/tests/testdata/test.txt b/api/tests/testdata/test.txt new file mode 100644 index 00000000..e6578a2a --- /dev/null +++ b/api/tests/testdata/test.txt @@ -0,0 +1 @@ +Hallo, dit is mijn eerste tekst bestand. \ No newline at end of file diff --git a/api/urls.py b/api/urls.py index 9393d63d..a02fdb8c 100644 --- a/api/urls.py +++ b/api/urls.py @@ -51,7 +51,7 @@ path("api/scores/", score_list), path("api/scores//", score_detail), path("api/groepen/", groep_list), - path("api/groepen//", groep_detail, naam="groep_detail"), + path("api/groepen//", groep_detail, name="groep_detail"), ] urlpatterns = format_suffix_patterns(urlpatterns)