mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Merge pull request #53289 from cmcmarrow/test_kubernetes_lint_failures_silenced
stops pylint E1120 from showing No code was add it. Just fixing pylint warrnings
This commit is contained in:
commit
df448c20ed
@ -76,8 +76,10 @@ class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
|
||||
{'items': [{'metadata': {'name': 'mock_deployment_name'}}]}}
|
||||
)
|
||||
self.assertEqual(kubernetes.deployments(), ['mock_deployment_name'])
|
||||
# pylint: disable=E1120
|
||||
self.assertTrue(
|
||||
kubernetes.kubernetes.client.ExtensionsV1beta1Api().list_namespaced_deployment().to_dict.called)
|
||||
# pylint: enable=E1120
|
||||
|
||||
def test_services(self):
|
||||
'''
|
||||
@ -91,7 +93,9 @@ class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
|
||||
{'items': [{'metadata': {'name': 'mock_service_name'}}]}}
|
||||
)
|
||||
self.assertEqual(kubernetes.services(), ['mock_service_name'])
|
||||
# pylint: disable=E1120
|
||||
self.assertTrue(kubernetes.kubernetes.client.CoreV1Api().list_namespaced_service().to_dict.called)
|
||||
# pylint: enable=E1120
|
||||
|
||||
def test_pods(self):
|
||||
'''
|
||||
@ -105,8 +109,10 @@ class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
|
||||
{'items': [{'metadata': {'name': 'mock_pod_name'}}]}}
|
||||
)
|
||||
self.assertEqual(kubernetes.pods(), ['mock_pod_name'])
|
||||
# pylint: disable=E1120
|
||||
self.assertTrue(kubernetes.kubernetes.client.CoreV1Api().
|
||||
list_namespaced_pod().to_dict.called)
|
||||
# pylint: enable=E1120
|
||||
|
||||
def test_delete_deployments(self):
|
||||
'''
|
||||
@ -121,9 +127,11 @@ class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
|
||||
**{"delete_namespaced_deployment.return_value.to_dict.return_value": {'code': ''}}
|
||||
)
|
||||
self.assertEqual(kubernetes.delete_deployment("test"), {'code': 200})
|
||||
# pylint: disable=E1120
|
||||
self.assertTrue(
|
||||
kubernetes.kubernetes.client.ExtensionsV1beta1Api().
|
||||
delete_namespaced_deployment().to_dict.called)
|
||||
# pylint: enable=E1120
|
||||
|
||||
def test_create_deployments(self):
|
||||
'''
|
||||
@ -137,9 +145,11 @@ class KubernetesTestCase(TestCase, LoaderModuleMockMixin):
|
||||
)
|
||||
self.assertEqual(kubernetes.create_deployment("test", "default", {}, {},
|
||||
None, None, None), {})
|
||||
# pylint: disable=E1120
|
||||
self.assertTrue(
|
||||
kubernetes.kubernetes.client.ExtensionsV1beta1Api().
|
||||
create_namespaced_deployment().to_dict.called)
|
||||
# pylint: enable=E1120
|
||||
|
||||
@staticmethod
|
||||
def settings(name, value=None):
|
||||
|
Loading…
Reference in New Issue
Block a user