Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 54f5519

Browse filesBrowse files
authored
Fix task creation in a test (#9405)
1 parent 2ad5848 commit 54f5519
Copy full SHA for 54f5519

File tree

1 file changed

+6
-2
lines changed
Filter options

1 file changed

+6
-2
lines changed

‎tests/python/rest_api/test_projects.py

Copy file name to clipboardExpand all lines: tests/python/rest_api/test_projects.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,15 @@ def test_org_owner_can_get_project_backup(self, find_users, is_project_staff, is
346346
self._test_can_get_project_backup(user["username"], project["id"])
347347

348348
def test_can_get_backup_project_when_some_tasks_have_no_data(self):
349-
project = next((p for p in self.projects if 0 < p["tasks"]["count"]))
349+
project = next(p for p in self.projects if 0 < p["tasks"]["count"])
350350

351351
# add empty task to project
352+
org_id = project["organization"]
352353
response = post_method(
353-
"admin1", "tasks", {"name": "empty_task", "project_id": project["id"]}
354+
"admin1",
355+
"tasks",
356+
{"name": "empty_task", "project_id": project["id"]},
357+
**({"org_id": org_id} if org_id else {}),
354358
)
355359
assert response.status_code == HTTPStatus.CREATED
356360

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.