@@ -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
123123def 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
128128def 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
148148def 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