Exemple #1
0
class DataBaseTest(TestCase):

    def setUp(self):
        self.database = MongoDataBase(
            data_scope="test_store", auto_connect=False
        )

    def test_connect(self):
        self.database.connect()
        self.assertTrue(self.database.connected())
        self.database.disconnect()
        self.assertFalse(self.database.connected())
        self.database.reconnect()
        self.assertTrue(self.database.connected())
Exemple #2
0
 def setUp(self):
     self.database = MongoDataBase(
         data_scope="test_store", auto_connect=False
     )