コード例 #1
0
 def tearDown(self):
     store = new_store()
     for person in store.find(Person, name=NAME):
         store.remove(person)
     store.commit()
     DomainTest.tearDown(self)
     store.close()
コード例 #2
0
    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)
コード例 #3
0
ファイル: test_transaction.py プロジェクト: Guillon88/stoq
    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)
コード例 #4
0
 def tearDown(self):
     store = new_store()
     for person in store.find(Person, name=NAME):
         store.remove(person)
     store.commit()
     DomainTest.tearDown(self)
     store.close()
コード例 #5
0
ファイル: test_boleto.py プロジェクト: Felipebros/stoq
 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
コード例 #6
0
ファイル: test_boleto.py プロジェクト: leandrorchaves/stoq
 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
コード例 #7
0
ファイル: uitestutils.py プロジェクト: rosalin/stoq
    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))
コード例 #8
0
    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))