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

pytest-django helpers are making queries in background when using markers #35

Closed
NyanKiyoshi opened this issue Jun 5, 2019 · 0 comments
Assignees
Labels
bug Something isn't working in progress
Milestone

Comments

@NyanKiyoshi
Copy link
Owner

Describe the bug
If we do something like this:

@pytest.mark.django_db
@pytest.mark.count_queries
def test_get_payment_token(api_client):
    pass

It will generate queries from the django_db fixture.

The solution is:

def test_get_payment_token(db, api_client, count_queries):
    pass

But then we lose the ability to filter tests by markers.

@NyanKiyoshi NyanKiyoshi added the bug Something isn't working label Jun 5, 2019
@NyanKiyoshi NyanKiyoshi added this to the v1.0.0 milestone Jun 5, 2019
@NyanKiyoshi NyanKiyoshi mentioned this issue Jun 5, 2019
21 tasks
@NyanKiyoshi NyanKiyoshi self-assigned this Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress
Projects
None yet
Development

No branches or pull requests

1 participant