-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Adding tests for managed_vms/analytics. Fixes #180 #350
Conversation
def app(monkeypatch): | ||
monkeypatch.setenv('GA_TRACKING_ID', '1234') | ||
|
||
import main |
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.
I assume this has something to do with monkeypathcing>
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.
yar, follows the same pattern at managed_vms/mailjet/main_test.py
. Basically you can't import main until the env vars are patched. This is actually a common pattern in test fixtures - hide how the actual object constructed from the tests.
Change-Id: I8f049927e81f6786d1221a867539b64a2e5245db
3ace55f
to
2ab84ef
Compare
lgtm |
No description provided.