MCPcopy
hub / github.com/aptly-dev/aptly / check_task_fail

Method check_task_fail

system/api_lib.py:102–108  ·  view source on GitHub ↗
(self, task, expected_output=None)

Source from the content-addressed store, hash-verified

100 raise Exception(f"task failed: {resp2.text}")
101
102 def check_task_fail(self, task, expected_output=None):
103 self.check_equal(task.status_code, 200)
104 if task.json()['State'] == TASK_SUCCEEDED:
105 raise Exception("task expected to fail")
106 if expected_output:
107 resp = self.get("/api/tasks/" + str(task.json()['ID']) + "/output")
108 self.check_equal(resp.json(), expected_output)
109
110 def put(self, uri, *args, **kwargs):
111 if "json" in kwargs:

Callers 8

checkMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80
checkMethod · 0.80

Calls 2

getMethod · 0.95
check_equalMethod · 0.80

Tested by

no test coverage detected