Skip to content

Commit

Permalink
Debug failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
allisonking committed Aug 17, 2022
1 parent 6f173e3 commit daf3ca8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/fidesctl/ctl/core/api_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def get_server_resource(
raw_server_response: Response = api.get(
url=url, resource_type=resource_type, resource_id=resource_key, headers=headers
)
print("response status code", raw_server_response.status_code)

server_resource: Optional[FidesModel] = (
raw_server_response.json()
Expand Down
7 changes: 6 additions & 1 deletion tests/ctl/core/test_api_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ def created_resources(
base_resource.fides_key = "{}_{}".format(
base_resource.fides_key, str(uuid.uuid4())[:6]
)
_api.create(
print("\n base resource", base_resource)
result = _api.create(
url=test_config.cli.server_url,
resource_type=resource_type,
json_resource=base_resource.json(exclude_none=True),
headers=test_config.user.request_headers,
)
print("created?", result.status_code)
created_keys.append(base_resource.fides_key)

# Wait for test to finish before cleaning up resources
Expand Down Expand Up @@ -93,8 +95,11 @@ def test_get_server_resource_found_resource(
"""
Tests that an existing resource is returned by helper
"""
print("created resources", created_resources)
resource_type = created_resources[0]
print(resource_type)
resource_key = created_resources[1][0]
print(resource_key)
result: FidesModel = _api_helpers.get_server_resource(
url=test_config.cli.server_url,
resource_type=resource_type,
Expand Down

0 comments on commit daf3ca8

Please sign in to comment.