mockito.unstub

Here are the examples of the python api mockito.unstub taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

6 Examples 7

Example 1

Project: pixelated-user-agent
Source File: test_drafts.py
View license
    def tearDown(self):
        unstub()

Example 2

View license
    def tearDown(self):
        unstub()

Example 3

View license
    def tearDown(self):
        unstub()

Example 4

View license
    def tearDown(self):
        unstub()

Example 5

View license
    def tearDown(self):
        self.tmp_dir.dissolve()
        unstub()

Example 6

Project: bigtempo
Source File: auditor.py
View license
def _create_datasource_test_case_for(engine):
    class DatasourceTestCase(unittest.TestCase):

        @classmethod
        def setUpClass(cls):
            testing_datasource_factory_mock = mock()

            def testing_datasource_factory(cls):
                mock_result = testing_datasource_factory_mock.build(cls)
                if mock_result:
                    return mock_result
                return cls()

            cls.testing_datasource_factory_mock = testing_datasource_factory_mock
            cls.original_datasource_factory = engine._datasource_factory
            engine._datasource_factory = testing_datasource_factory

        @classmethod
        def tearDownClass(cls):
            engine._datasource_factory = cls.original_datasource_factory
            engine._instances = {}

        def setUp(self):
            engine._instances = {}

        def tearDown(self):
            unstub()

    return DatasourceTestCase