mock.call.pre_restore_check

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

1 Examples 7

Example 1

Project: fuel-octane Source File: test_restore.py
def test_restore_data(mocker):
    tar_mock = mocker.patch("tarfile.open")
    archivator_mock_1 = mocker.Mock()
    archivator_mock_2 = mocker.Mock()
    path = "path"
    restore.restore_data(path, [archivator_mock_1, archivator_mock_2], None)
    tar_mock.assert_called_once_with(path)
    for arch_mock in [archivator_mock_1, archivator_mock_2]:
        arch_mock.assert_has_calls([
            mock.call(tar_mock.return_value, None),
            mock.call().pre_restore_check(),
            mock.call().restore()])