-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Do not assume active DB when not specified #210
Conversation
Codecov ReportBase: 95.58% // Head: 95.58% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #210 +/- ##
=======================================
Coverage 95.58% 95.58%
=======================================
Files 36 36
Lines 408 408
=======================================
Hits 390 390
Misses 18 18
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add also a test case?
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Yup. Just added a testcase with a DB Router |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should run
pre-commit run -a
before commit files. - Tests are broken with older
Python
/Django
versions.
@VaZark could you fix tests? |
Older versions of Django (<2.0) aren't throwing an exception when hitting a non-specified DB in a test case class AdminInterfaceModelsWithDBRoutingTestCase(TestCase):
databases = ["replica"] Are you aware if there exists a different parameter to be used to specify active DB in older versions of Django ?? Or a way to skip the test for django < 2.0 ? |
I always forget that this project supports ancient versions of Django! |
@VaZark you can skip the test using @merwok it's already my intention to drop support for django versions < 2.2. |
I added the skip in the latest commit for django older than 2.0
|
Related to #208
Let Django decide the current DB when not specified in the function call.