-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Throw warning if DATABASE_URL isn't set #199
Conversation
Codecov Report
@@ Coverage Diff @@
## master #199 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 66 69 +3
Branches 15 16 +1
=========================================
+ Hits 66 69 +3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Whilst I get what this PR is trying to do I do not think adding in extra parameters is the correct way to do this. It seems like a messy API design. We also need to be wary that a user might want the I think this needs to be thought over before proceeding. |
Agreed, but I thought that was where consensus in #114 had gotten to, hence adding it. I can remove that bit if you want.
If they do that, then it won't configure a database at all. I'd say that the working assumption for this library is "users always want a DB", and that warnings should flag if we're failing to do that. So, anything other than None is a perfectly good value and should be fed to Thoughts? |
@ddelange @mattseymour I've updated this in line with the description now in #114 (comment) which I think is the right middle ground here. Thoughts? Can I merge? |
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.
super many thanks!
Fixes #114
Along the way, to make the test cleaner, it fixes all the explicit "set os.environ" calls with
mock.patch
work instead.