UT: Return a list in Propagation Credentials

* Add TODOs to change to Credentials from common.credentials
This commit is contained in:
Ilija Lazoroski 2022-07-07 10:25:23 +02:00
parent af1ab34aa3
commit f806f848fa
2 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,7 @@ PROPAGATION_CREDENTIALS_2 = {
} }
# TODO: Use Credentials from common.credentials when serialization is implemented
class StubPropagationCredentialsRepository(ICredentialsRepository): class StubPropagationCredentialsRepository(ICredentialsRepository):
def get_configured_credentials(self) -> Sequence[Credentials]: def get_configured_credentials(self) -> Sequence[Credentials]:
pass pass

View File

@ -29,9 +29,10 @@ def test_propagation_credentials_endpoint_get(flask_client):
resp = flask_client.get(propagation_credentials_url) resp = flask_client.get(propagation_credentials_url)
assert resp.status_code == 200 assert resp.status_code == 200
actual_propagation_credentials = json.loads(resp.data)["propagation_credentials"] actual_propagation_credentials = json.loads(resp.data)
assert len(actual_propagation_credentials) == 2 assert len(actual_propagation_credentials) == 2
# TODO: delete the removal of monkey_guid key when the serialization of credentials
del actual_propagation_credentials[0]["monkey_guid"] del actual_propagation_credentials[0]["monkey_guid"]
assert actual_propagation_credentials[0] == PROPAGATION_CREDENTIALS_1 assert actual_propagation_credentials[0] == PROPAGATION_CREDENTIALS_1
del actual_propagation_credentials[1]["monkey_guid"] del actual_propagation_credentials[1]["monkey_guid"]