def test_download_repo_verify(self, mock_units_qs, mock_create_requests, mock_step): """Assert the download step is initialized and called with all units.""" mock_units_qs.return_value = [['some'], ['lists']] content_controller.download_repo('fake-id', verify_all_units=True) mock_units_qs.assert_called_once_with('fake-id') self.assertEqual(list(mock_create_requests.call_args[0][0]), ['some', 'lists']) mock_step.return_value.process_lifecycle.assert_called_once_with()
def test_download_repo_no_verify(self, mock_missing_units, mock_create_requests, mock_step): """Assert the download step is initialized and called with missing units.""" content_controller.download_repo('fake-id') mock_missing_units.assert_called_once_with('fake-id') mock_create_requests.assert_called_once_with( mock_missing_units.return_value) mock_step.return_value.process_lifecycle.assert_called_once_with()
def test_download_repo_no_verify(self, mock_missing_units, mock_create_requests, mock_step): """Assert the download step is initialized and called with missing units.""" content_controller.download_repo('fake-id') mock_missing_units.assert_called_once_with('fake-id') mock_create_requests.assert_called_once_with(mock_missing_units.return_value) mock_step.return_value.process_lifecycle.assert_called_once_with()