Parent: [3abb2e] (diff)

Child: [6a2ec3] (diff)

Download this file

__init__.py    27 lines (17 with data), 658 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 alluratest.controller import setup_basic_test
from allura.websetup.bootstrap import clear_all_database_tables
def setUp(self):
setup_basic_test()
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()