예제 #1
0
 def setUp(self):
     try:
         HookTest.setUp(self)
     except self.Error:
         self.assertHooks(['beforeSetUp', '_setup', 'afterClear'])
         # Connection has been closed
         self.assertEqual(connections.count(), 0)
예제 #2
0
 def setUp(self):
     try:
         HookTest.setUp(self)
     except self.Error:
         self.assertHooks(['beforeSetUp', '_setup', 'afterClear'])
         # Connection has been closed
         self.assertEqual(connections.count(), 0)
예제 #3
0
 def tearDown(self):
     self._called = []
     try:
         HookTest.tearDown(self)
     except self.Error:
         self.assertHooks(['beforeTearDown', 'beforeClose', 'afterClear'])
         # Connection has been closed
         self.assertEqual(connections.count(), 0)
예제 #4
0
 def tearDown(self):
     self._called = []
     try:
         HookTest.tearDown(self)
     except self.Error:
         self.assertHooks(['beforeTearDown', 'beforeClose', 'afterClear'])
         # Connection has been closed
         self.assertEqual(connections.count(), 0)
예제 #5
0
 def testClearClosesConnection(self):
     self.assertEqual(connections.count(), 1)
     self._clear()
     self.assertEqual(connections.count(), 0)
예제 #6
0
 def testAppOpensConnection(self):
     self.assertEqual(connections.count(), 1)
     self._app()
     self.assertEqual(connections.count(), 2)
예제 #7
0
 def testCloseClosesAllConnections(self):
     self._app()
     self.assertEqual(connections.count(), 2)
     self._close()
     self.assertEqual(connections.count(), 0)
예제 #8
0
 def testAppOpensConnection(self):
     self.assertEqual(connections.count(), 1)
     self._app()
     self.assertEqual(connections.count(), 2)
예제 #9
0
 def testCloseClosesAllConnections(self):
     self._app()
     self.assertEqual(connections.count(), 2)
     self._close()
     self.assertEqual(connections.count(), 0)
예제 #10
0
 def testCloseClosesConnection(self):
     self.assertEqual(connections.count(), 1)
     self._close()
     self.assertEqual(connections.count(), 0)