Skip to content

Instantly share code, notes, and snippets.

@Bekt
Created August 11, 2014 04:37
Show Gist options
  • Save Bekt/c8bde532f38015cced95 to your computer and use it in GitHub Desktop.
Save Bekt/c8bde532f38015cced95 to your computer and use it in GitHub Desktop.
Importing mock library in Python App Engine
mock (unittest.mock in Python 3.3+) is a great mocking library for Python. Including this library in a Python Google App Engine project can be somewhat tricky. Follow these instructions:
1. Download the latest tarball: https://pypi.python.org/pypi/mock
2. Extract it in your root project directory. Rename the folder to mock/
3. Add a __init__.py file in the mock/ directory with the content:
from mock import *
You can now simply import mock in your Python App Engine project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment