Skip to content

Instantly share code, notes, and snippets.

@fivunlm
Last active August 15, 2017 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fivunlm/2bc72ec644dc13711b736755a76681c1 to your computer and use it in GitHub Desktop.
Save fivunlm/2bc72ec644dc13711b736755a76681c1 to your computer and use it in GitHub Desktop.
class SomeTestCase(unittest.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()
self.testbed.init_datastore_v3_stub()
self.testbed.init_memcache_stub()
ndb.get_context().clear_cache()
self.app = main.app.test_client()
# Diff is 804 characters long. Set self.maxDiff to None to see it.
self.maxDiff = None
def tearDown(self):
self.testbed.deactivate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment