Skip to content

Instantly share code, notes, and snippets.

@chfw
Created January 25, 2016 17:12
Show Gist options
  • Save chfw/4ab8b8f74a1b41d4555f to your computer and use it in GitHub Desktop.
Save chfw/4ab8b8f74a1b41d4555f to your computer and use it in GitHub Desktop.
how to mock a global variable in a python file
@patch("module.file.BASE_PATH", 'tests/fixtures')
def test_organisation_to_es_document():
# do the test normally
@AnatoliyLitinskiy
Copy link

Cool! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment