Skip to content

[Feature]: Can't use 2 different clients within the same test #788

@aldbr

Description

@aldbr

User Story

As a diracx developer, I want to create tests where 2 different clients interact with each other (client = client_factory), so that I can create more complex tests.

Feature Description

There was a PR that demonstrated the issue, but it has not been fixed:
#583

See the reproducer:

@pytest.fixture
def user_client(client_factory):
    with client_factory.normal_user() as client:
        yield client


def test_that_fails(test_client, user_client):
    assert True

There was a real use case at some point, but might have been addressed through a workaround. In any case, this is likely something we want to keep to create more complex test.

Definition of Done

  • A test involving 2 different clients should pass

Alternatives Considered

No response

Related Issues

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions