@@ -103,7 +103,7 @@ def task_func():
103
103
task_obj = current_labthing ().actions .spawn (task_func )
104
104
105
105
with thing_client as c :
106
- response = c .get ("/actions " ).json
106
+ response = c .get ("/tasks " ).json
107
107
ids = [task .get ("id" ) for task in response ]
108
108
assert str (task_obj .id ) in ids
109
109
@@ -116,13 +116,13 @@ def task_func():
116
116
task_id = str (task_obj .id )
117
117
118
118
with thing_client as c :
119
- response = c .get (f"/actions /{ task_id } " ).json
119
+ response = c .get (f"/tasks /{ task_id } " ).json
120
120
assert response
121
121
122
122
123
123
def test_task_representation_missing (thing_client ):
124
124
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
126
126
127
127
128
128
def test_task_kill (thing_client ):
@@ -139,12 +139,12 @@ def task_func():
139
139
140
140
# Send a DELETE request to terminate the task
141
141
with thing_client as c :
142
- response = c .delete (f"/actions /{ task_id } " )
142
+ response = c .delete (f"/tasks /{ task_id } " )
143
143
assert response .status_code == 200
144
144
# Test task was stopped
145
145
assert task_obj ._status == "stopped"
146
146
147
147
148
148
def test_task_kill_missing (thing_client ):
149
149
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