Esempio n. 1
0
 def setUp(self):
     super(VersionNegotiationMixinTest, self).setUp()
     self.test_object = http.VersionNegotiationMixin()
     self.test_object.os_ironic_api_version = '1.6'
     self.test_object.api_version_select_state = 'default'
     self.mock_mcu = mock.MagicMock()
     self.test_object._make_connection_url = self.mock_mcu
     self.response = utils.FakeResponse({}, status=406)
Esempio n. 2
0
 def setUp(self):
     super(VersionNegotiationMixinTest, self).setUp()
     self.test_object = http.VersionNegotiationMixin()
     self.test_object.os_ironic_api_version = '1.6'
     self.test_object.api_version_select_state = 'default'
     self.test_object.endpoint = "http://localhost:1234"
     self.mock_mcu = mock.MagicMock()
     self.test_object._make_connection_url = self.mock_mcu
     self.response = utils.FakeResponse({}, status=406)
     self.test_object.get_server = mock.MagicMock(return_value=('localhost',
                                                                '1234'))