Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate the v1 Python client into the integration tests #592

Open
4 tasks
keithmanville opened this issue Aug 8, 2024 · 0 comments
Open
4 tasks

Integrate the v1 Python client into the integration tests #592

keithmanville opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
blocked Unable to move forward because a dependency has yet to be completed test Additions or changes to project tests

Comments

@keithmanville
Copy link
Collaborator

keithmanville commented Aug 8, 2024

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)

Definition of done:

  • The flask client fixture is replaced with a Dioptra client fixture
  • All calls to the test client are replaced with calls to the Dioptra client
  • All tests passed
  • The branch is merged into dev
@keithmanville keithmanville added test Additions or changes to project tests blocked Unable to move forward because a dependency has yet to be completed labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Unable to move forward because a dependency has yet to be completed test Additions or changes to project tests
Projects
None yet
Development

No branches or pull requests

2 participants