From e88c380329e32dea08d79c279d2e92487f098f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Hermida?= Date: Wed, 13 Jun 2018 11:59:29 +0200 Subject: [PATCH] Fix tests --- taiga/projects/api.py | 2 +- tests/integration/test_importer_api.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/taiga/projects/api.py b/taiga/projects/api.py index 3448c9e6..55f8a115 100644 --- a/taiga/projects/api.py +++ b/taiga/projects/api.py @@ -372,7 +372,7 @@ class ProjectViewSet(LikedResourceMixin, HistoryResourceMixin, try: user = user_model.objects.get(id=user_id) except user_model.DoesNotExist: - return response.BadRequest(_("Project already have due dates")) + return response.BadRequest(_("The user doesn't exist")) # Check the user is a membership from the project if not project.memberships.filter(user=user).exists(): diff --git a/tests/integration/test_importer_api.py b/tests/integration/test_importer_api.py index 4574594f..e69028bd 100644 --- a/tests/integration/test_importer_api.py +++ b/tests/integration/test_importer_api.py @@ -237,9 +237,15 @@ def test_valid_project_import_with_extra_data(client): "task_statuses": [{ "name": "Test" }], + "task_duedates": [{ + "name": "Test" + }], "issue_statuses": [{ "name": "Test" }], + "issue_duedates": [{ + "name": "Test" + }], } response = client.json.post(url, json.dumps(data)) @@ -276,6 +282,7 @@ def test_invalid_project_import_without_roles(client): assert len(response.data) == 2 assert Project.objects.filter(slug="imported-project").count() == 0 + def test_invalid_project_import_with_extra_data(client): user = f.UserFactory.create() client.login(user)