From 6299e291e15f01f9bdbfccc36b52711f8df31bbc Mon Sep 17 00:00:00 2001 From: Fabian von Feilitzsch Date: Tue, 23 Jul 2019 18:19:45 -0400 Subject: [PATCH] line length --- dynamic/test_client.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/dynamic/test_client.py b/dynamic/test_client.py index 055767d6..d6d65c6d 100644 --- a/dynamic/test_client.py +++ b/dynamic/test_client.py @@ -40,7 +40,8 @@ def test_cluster_custom_resources(self): client = DynamicClient(api_client.ApiClient(configuration=self.config)) with self.assertRaises(ResourceNotFoundError): - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ClusterChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ClusterChangeMe') crd_api = client.resources.get(kind='CustomResourceDefinition') name = 'clusterchangemes.apps.example.com' @@ -77,11 +78,13 @@ def test_cluster_custom_resources(self): self.assertTrue(resp.status) try: - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ClusterChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ClusterChangeMe') except ResourceNotFoundError: - # Sometimes need to wait a sec for the discovery layer to get updated + # Need to wait a sec for the discovery layer to get updated time.sleep(2) - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ClusterChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ClusterChangeMe') resp = changeme_api.get() self.assertEqual(resp.items, []) changeme_name = 'custom-resource' + short_uuid() @@ -127,13 +130,15 @@ def test_cluster_custom_resources(self): time.sleep(2) client.resources.invalidate_cache() with self.assertRaises(ResourceNotFoundError): - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ClusterChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ClusterChangeMe') def test_namespaced_custom_resources(self): client = DynamicClient(api_client.ApiClient(configuration=self.config)) with self.assertRaises(ResourceNotFoundError): - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ChangeMe') crd_api = client.resources.get(kind='CustomResourceDefinition') name = 'changemes.apps.example.com' @@ -170,11 +175,13 @@ def test_namespaced_custom_resources(self): self.assertTrue(resp.status) try: - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ChangeMe') except ResourceNotFoundError: - # Sometimes need to wait a sec for the discovery layer to get updated + # Need to wait a sec for the discovery layer to get updated time.sleep(2) - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ChangeMe') resp = changeme_api.get() self.assertEqual(resp.items, []) changeme_name = 'custom-resource' + short_uuid() @@ -228,7 +235,8 @@ def test_namespaced_custom_resources(self): time.sleep(2) client.resources.invalidate_cache() with self.assertRaises(ResourceNotFoundError): - changeme_api = client.resources.get(api_version='apps.example.com/v1', kind='ChangeMe') + changeme_api = client.resources.get( + api_version='apps.example.com/v1', kind='ChangeMe') def test_service_apis(self): client = DynamicClient(api_client.ApiClient(configuration=self.config)) @@ -279,7 +287,8 @@ def test_service_apis(self): def test_replication_controller_apis(self): client = DynamicClient(api_client.ApiClient(configuration=self.config)) - api = client.resources.get(api_version='v1', kind='ReplicationController') + api = client.resources.get( + api_version='v1', kind='ReplicationController') name = 'frontend-' + short_uuid() rc_manifest = { @@ -323,7 +332,7 @@ def test_configmap_apis(self): }, "data": { "config.json": "{\"command\":\"/usr/bin/mysqld_safe\"}", - "frontend.cnf": "[mysqld]\nbind-address = 10.0.0.3\nport = 3306\n" + "frontend.cnf": "[mysqld]\nbind-address = 10.0.0.3\n" } }