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

update import to work with django < 4.2 #210

Merged
merged 1 commit into from
May 10, 2024

Conversation

stefano-esubasta
Copy link
Contributor

trying to run tests with django versions < 4.2 threw an import error since assertQuerySetEqual was named assertQuerysetEqual, with a lowercase "s" in "set":

tests/test_webservices.py:12: in <module>
    from pytest_django.asserts import assertQuerySetEqual
E   ImportError: cannot import name 'assertQuerySetEqual' from 'pytest_django.asserts'

this swaps the right name in according to django's version.

trying to run tests with django versions < 4.2 threw an import error
since assertQuerySetEqual was named assertQuerysetEqual, with a
lowercase "s" in "set":

tests/test_webservices.py:12: in <module>
    from pytest_django.asserts import assertQuerySetEqual
E   ImportError: cannot import name 'assertQuerySetEqual' from 'pytest_django.asserts'

this swaps the right name in according to django's version.
@WhyNotHugo WhyNotHugo merged commit e307ddb into WhyNotHugo:main May 10, 2024
6 checks passed
@WhyNotHugo
Copy link
Owner

Good catch, thanks. I'll make sure CI runs Django 4.2 as well.

@stefano-esubasta stefano-esubasta deleted the django41-compat branch May 10, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants