Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion framework/python/src/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,6 @@ def get_test_modules(self):

def get_test_packs(self):
test_packs: list[str] = []
for test_pack in self._test_run.get_test_orc().get_test_packs():
for test_pack in self._testrun.get_test_orc().get_test_packs():
test_packs.append(test_pack.name)
return test_packs
15 changes: 15 additions & 0 deletions testing/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,21 @@ def test_get_test_modules(testrun): # pylint: disable=W0613
# Check if the response is a list
assert isinstance(response, list)

def test_sys_testpacks(testrun): # pylint: disable=W0613
""" Test for system testpack endpoint (200) """

# Send the get request to the API
r = requests.get(f"{API}/system/testpacks", timeout=5)

# Check if status code is 200 (ok)
assert r.status_code == 200

# Parse the response
response = r.json()

# Check if the response is a list
assert isinstance(response, list)

# Tests for certificates endpoints

def delete_all_certs():
Expand Down