Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yasakova-anastasia committed Feb 22, 2023
1 parent 4b1855d commit 7583d5b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/python/rest_api/test_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def test_cannot_rename_label_to_duplicate_name(self, source_type, user):
response = self._test_update_denied(
user, lid=labels[0]["id"], data=payload, expected_status=HTTPStatus.BAD_REQUEST
)
assert f"Label '{payload['name']}' already exists" in response.data.decode()
assert "All label names must be unique" in response.data.decode()

def test_admin_patch_sandbox_label(self, admin_sandbox_case):
label, user = get_attrs(admin_sandbox_case, ["label", "user"])
Expand Down
2 changes: 1 addition & 1 deletion tests/python/rest_api/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ def test_cannot_rename_label_to_duplicate_name(self, projects, labels, admin_use
admin_user, f'/projects/{project["id"]}', {"labels": [label_payload]}
)
assert response.status_code == HTTPStatus.BAD_REQUEST
assert f"Label '{project_labels[0]['name']}' already exists" in response.text
assert "All label names must be unique" in response.text

def test_cannot_add_foreign_label(self, projects, labels, admin_user):
project = list(projects)[0]
Expand Down
2 changes: 1 addition & 1 deletion tests/python/rest_api/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ def test_cannot_rename_label_to_duplicate_name(self, tasks, labels, admin_user):

response = patch_method(admin_user, f'/tasks/{task["id"]}', {"labels": [label_payload]})
assert response.status_code == HTTPStatus.BAD_REQUEST
assert f"Label '{task_labels[0]['name']}' already exists" in response.text
assert "All label names must be unique" in response.text

def test_cannot_add_foreign_label(self, tasks, labels, admin_user):
task = list(tasks)[0]
Expand Down

0 comments on commit 7583d5b

Please sign in to comment.