def tearDown(self): store = new_store() for person in store.find(Person, name=NAME): store.remove(person) store.commit() DomainTest.tearDown(self) store.close()
def tearDown(self): # Make sure to remove all committed persons from the database with new_store() as store: test_names = [u'dummy transaction test', u'dummy', u'doe', u'john'] store.find(Person, Person.name.is_in(test_names)).remove() DomainTest.tearDown(self)
def tearDown(self): DomainTest.tearDown(self) try: os.unlink(self._filename) except OSError: pass if self._pdf_html: try: os.unlink(self._pdf_html) except OSError: pass
def tearDown(self): sys.excepthook = self._old_hook DomainTest.tearDown(self) messages = test_system_notifier.reset() if messages: self.fail("Unhandled messages: %r, use @mock.patch()" % ( messages, )) if self._unhandled_exceptions: self.fail("Unhandled exceptions: %r" % ( self._unhandled_exceptions))