예제 #1
0
 def test_07_empty(self):
     db = Database(self._db_name)
     table = db.table(self._tb_name)
     for doc in self._data:
         table.append(dict(doc))
     self.assertEqual(table.records, len(self._data))
     table.empty()
     self.assertEqual(table.records, 0)
     self.assertTrue(db.exists('demo1'))
예제 #2
0
 def test_05_drop(self):
     db = Database(self._db_name)
     db.table(self._tb_name)
     db.drop(self._tb_name)
     self.assertFalse(db.exists('demo1'))
     self.assertEqual(db.tables, [])
예제 #3
0
 def test_04_exists(self):
     db = Database(self._db_name)
     db.table(self._tb_name)
     self.assertTrue(db.exists('demo1'))