Skip to content

Commit 3117b74

Browse files
author
Joel Collins
committed
Fixed legacy /tasks view tests
1 parent 185547d commit 3117b74

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_default_views.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def task_func():
103103
task_obj = current_labthing().actions.spawn(task_func)
104104

105105
with thing_client as c:
106-
response = c.get("/actions").json
106+
response = c.get("/tasks").json
107107
ids = [task.get("id") for task in response]
108108
assert str(task_obj.id) in ids
109109

@@ -116,13 +116,13 @@ def task_func():
116116
task_id = str(task_obj.id)
117117

118118
with thing_client as c:
119-
response = c.get(f"/actions/{task_id}").json
119+
response = c.get(f"/tasks/{task_id}").json
120120
assert response
121121

122122

123123
def test_task_representation_missing(thing_client):
124124
with thing_client as c:
125-
assert c.get("/actions/missing_id").status_code == 404
125+
assert c.get("/tasks/missing_id").status_code == 404
126126

127127

128128
def test_task_kill(thing_client):
@@ -139,12 +139,12 @@ def task_func():
139139

140140
# Send a DELETE request to terminate the task
141141
with thing_client as c:
142-
response = c.delete(f"/actions/{task_id}")
142+
response = c.delete(f"/tasks/{task_id}")
143143
assert response.status_code == 200
144144
# Test task was stopped
145145
assert task_obj._status == "stopped"
146146

147147

148148
def test_task_kill_missing(thing_client):
149149
with thing_client as c:
150-
assert c.delete("/actions/missing_id").status_code == 404
150+
assert c.delete("/tasks/missing_id").status_code == 404

0 commit comments

Comments
 (0)