Created
August 11, 2014 04:37
-
-
Save Bekt/c8bde532f38015cced95 to your computer and use it in GitHub Desktop.
Importing mock library in Python App Engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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