예제 #1
0
 def test_status5_xmlfault(self, mock_serverproxy):
     """Test a successful status request to Satellite 5 server."""
     client = mock_serverproxy.return_value
     client.auth.login.side_effect = mock_xml_fault
     with self.assertRaises(SatelliteException):
         _status5(self.scan_task)
         mock_serverproxy.auth.login.assert_called_once_with(ANY, ANY)
예제 #2
0
 def test_status5(self, mock_serverproxy):
     """Test a successful status request to Satellite 5 server."""
     client = mock_serverproxy.return_value
     client.auth.login.return_value = 'key'
     client.auth.logout.return_value = 'key'
     status_code, api_version = _status5(self.scan_task)
     self.assertEqual(status_code, 200)
     self.assertEqual(api_version, SourceOptions.SATELLITE_VERSION_5)