Exemple #1
0
    def setUp(self):
        from stoqlib.database.runtime import new_store
        self.store = new_store()
        self.fake.set_store(self.store)
        self.set_store(self.store)

        self._unhandled_exceptions = []
        self._old_hook = sys.excepthook
        sys.excepthook = self._except_hook
        test_system_notifier.reset()
        DomainTest.setUp(self)
Exemple #2
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))
Exemple #3
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))
Exemple #4
0
    def tearDown(self):
        self.store.close()
        self.fake.set_store(None)
        self.clear()

        sys.excepthook = self._old_hook

        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))
Exemple #5
0
 def setUp(self):
     self._unhandled_exceptions = []
     self._old_hook = sys.excepthook
     sys.excepthook = self._except_hook
     test_system_notifier.reset()
     DomainTest.setUp(self)
Exemple #6
0
 def setUp(self):
     self._unhandled_exceptions = []
     self._old_hook = sys.excepthook
     sys.excepthook = self._except_hook
     test_system_notifier.reset()
     DomainTest.setUp(self)