summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2018-05-20 14:30:15 -0700
committerMonty Taylor <mordred@inaugust.com>2018-05-25 18:28:07 +0000
commit46ac30df8eded2d6433adaf0ed9447b9188049fc (patch)
tree70031c1f68e851e73c76112bcbe10e2442e46db3
parent2c2305e14178b45912bd2ddbd9f42e4aabfbaa88 (diff)
downloados-client-config-46ac30df8eded2d6433adaf0ed9447b9188049fc.tar.gz
Remove app_name config tests
These are testing that an underlying method is being called with a set of parameters but the method isn't implemented in this library. Change-Id: I29d354f7584d783104220a797ef9cf97bcc490a2
-rw-r--r--os_client_config/tests/test_cloud_config.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/os_client_config/tests/test_cloud_config.py b/os_client_config/tests/test_cloud_config.py
index 42d6877..06ea0fd 100644
--- a/os_client_config/tests/test_cloud_config.py
+++ b/os_client_config/tests/test_cloud_config.py
@@ -162,63 +162,6 @@ class TestCloudConfig(base.TestCase):
cc.get_session)
@mock.patch.object(ksa_session, 'Session')
- def test_get_session(self, mock_session):
- config_dict = defaults.get_defaults()
- config_dict.update(fake_services_dict)
- fake_session = mock.Mock()
- fake_session.additional_user_agent = []
- mock_session.return_value = fake_session
- cc = cloud_config.CloudConfig(
- "test1", "region-al", config_dict, auth_plugin=mock.Mock())
- cc.get_session()
- mock_session.assert_called_with(
- auth=mock.ANY,
- verify=True, cert=None, timeout=None, discovery_cache=None)
- self.assertEqual(
- [('os-client-config', '1.2.3'), ('openstacksdk', '3.4.5')],
- fake_session.additional_user_agent)
-
- @mock.patch.object(ksa_session, 'Session')
- def test_get_session_with_app_name(self, mock_session):
- config_dict = defaults.get_defaults()
- config_dict.update(fake_services_dict)
- fake_session = mock.Mock()
- fake_session.additional_user_agent = []
- fake_session.app_name = None
- fake_session.app_version = None
- mock_session.return_value = fake_session
- cc = cloud_config.CloudConfig(
- "test1", "region-al", config_dict, auth_plugin=mock.Mock(),
- app_name="test_app", app_version="test_version")
- cc.get_session()
- mock_session.assert_called_with(
- auth=mock.ANY,
- verify=True, cert=None, timeout=None, discovery_cache=None)
- self.assertEqual(fake_session.app_name, "test_app")
- self.assertEqual(fake_session.app_version, "test_version")
- self.assertEqual(
- [('os-client-config', '1.2.3'), ('openstacksdk', '3.4.5')],
- fake_session.additional_user_agent)
-
- @mock.patch.object(ksa_session, 'Session')
- def test_get_session_with_timeout(self, mock_session):
- fake_session = mock.Mock()
- fake_session.additional_user_agent = []
- mock_session.return_value = fake_session
- config_dict = defaults.get_defaults()
- config_dict.update(fake_services_dict)
- config_dict['api_timeout'] = 9
- cc = cloud_config.CloudConfig(
- "test1", "region-al", config_dict, auth_plugin=mock.Mock())
- cc.get_session()
- mock_session.assert_called_with(
- auth=mock.ANY,
- verify=True, cert=None, timeout=9, discovery_cache=None)
- self.assertEqual(
- [('os-client-config', '1.2.3'), ('openstacksdk', '3.4.5')],
- fake_session.additional_user_agent)
-
- @mock.patch.object(ksa_session, 'Session')
def test_override_session_endpoint_override(self, mock_session):
config_dict = defaults.get_defaults()
config_dict.update(fake_services_dict)