Skip to content

Commit

Permalink
Add tests.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gomezjdaniel committed Feb 1, 2013
1 parent 27c16cc commit 5db7112
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

import unittest

from google.appengine.ext import testbed


class Base(unittest.TestCase):
def setUp(self):
self.testbed = testbed.Testbed()
self.testbed.activate()

if 'init' in self.__class__.__dict__:
self.init()

def tearDown(self):
self.testbed.deactivate()

def login(self, admin=False):
self.testbed.setup_env(
USER_EMAIL='test@example.com',
USER_ID='123',
USER_IS_ADMIN='1' if admin else '0',
overwrite=True
)

0 comments on commit 5db7112

Please sign in to comment.