Пример #1
0
class TestCancel(unittest.TestCase):
    def setUp(self):
        super(TestCancel, self).setUp()
        self.importer = DockerImporter()

    def test_calls_cancel(self):
        self.importer.sync_step = mock.MagicMock()

        self.importer.cancel_sync_repo()

        # make sure the step's cancel method was called
        self.importer.sync_step.cancel.assert_called_once_with()
Пример #2
0
class TestCancel(unittest.TestCase):
    def setUp(self):
        super(TestCancel, self).setUp()
        self.importer = DockerImporter()

    def test_calls_cancel(self):
        self.importer.sync_step = mock.MagicMock()

        self.importer.cancel_sync_repo()

        # make sure the step's cancel method was called
        self.importer.sync_step.cancel.assert_called_once_with()