Fix tests
parent
f86f429c4c
commit
5ef687dcf8
|
@ -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():
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue