Open keithmanville opened 1 month ago
Integrate the new Python client into existing tests, replacing the flask test client.
This will simplify the code for many of the "actions" For example, registering a queue uses the register_queue action:
def register_queue( client: FlaskClient, name: str, description: str, group_id: int, ) -> TestResponse: """snipped docstrings for brevity""" payload = {"name": name, "description": description, "group": group_id} return client.post( f"/{V1_ROOT}/{V1_QUEUES_ROUTE}/", json=payload, follow_redirects=True, )
which is called in the tests like this:
response = actions.register_queue(client, name=name, description="", group_id=group_id)
With the Dioptra client, the register_queue action can be deleted and calls to it can be replaced with calls to the client. For example:
client.queues.create(group_id, name, description)
Integrate the new Python client into existing tests, replacing the flask test client.
This will simplify the code for many of the "actions" For example, registering a queue uses the register_queue action:
which is called in the tests like this:
With the Dioptra client, the register_queue action can be deleted and calls to it can be replaced with calls to the client. For example:
Definition of done: