def test_close(self):
     try:
         self._db.close()
         self._db.printAll(self._table)
     except ProgrammingError:
         assert self._db is not Database()
         self._db = Database()
     else:
         raise AssertionError("database connection not closed")
 def setUp(self):
     self._db = Database()
     self._table = 'users'
     self.assertCreate()
     self.assertInsert()