Skip to content

Conversation

theacodes
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 16, 2016
def app(monkeypatch):
monkeypatch.setenv('GA_TRACKING_ID', '1234')

import main
Copy link
Contributor

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>

Copy link
Contributor Author

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
@waprin
Copy link
Contributor

waprin commented May 16, 2016

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants