示例#1
0
 def test_get_namespace(self):
     kubernetes_hook_with_namespace = KubernetesHook(
         conn_id='kubernetes_with_namespace')
     kubernetes_hook_without_namespace = KubernetesHook(
         conn_id='kubernetes_default_kube_config')
     assert kubernetes_hook_with_namespace.get_namespace(
     ) == 'mock_namespace'
     assert kubernetes_hook_without_namespace.get_namespace() == 'default'
示例#2
0
 def test_get_namespace(self):
     kubernetes_hook_with_namespace = KubernetesHook(
         conn_id='kubernetes_with_namespace')
     kubernetes_hook_without_namespace = KubernetesHook(
         conn_id='kubernetes_default_kube_config')
     self.assertEqual(kubernetes_hook_with_namespace.get_namespace(),
                      'mock_namespace')
     self.assertEqual(kubernetes_hook_without_namespace.get_namespace(),
                      'default')