コード例 #1
0
ファイル: test_content.py プロジェクト: maxamillion/pulp
 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()
コード例 #2
0
 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()
コード例 #3
0
 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()
コード例 #4
0
ファイル: test_content.py プロジェクト: maxamillion/pulp
 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()