Child: [32779c] (diff)

Download this file

__init__.py    27 lines (17 with data), 651 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from allura.tests.helpers import run_app_setup
from allura.websetup.bootstrap import clear_all_database_tables
def setUp(self):
run_app_setup()
class MockPatchTestCase(object):
patches = []
def setUp(self):
self._patch_instances = [patch_fn(self) for patch_fn in self.patches]
for patch_instance in self._patch_instances:
patch_instance.__enter__()
def tearDown(self):
for patch_instance in self._patch_instances:
patch_instance.__exit__()
class WithDatabase(MockPatchTestCase):
def setUp(self):
super(WithDatabase, self).setUp()
clear_all_database_tables()