Ejemplo n.º 1
0
 def test_unwrap_with_pykube(self):
     D = {'c': 'd'}
     d = k8s.unwrap(k8s.Secret(None, D))
     self.assertEqual(k8s._get_dict_path(d, 'c'), 'd')
Ejemplo n.º 2
0
 def test_set_get_dict_path_simple(self):
     d = {}
     k8s._set_dict_path(d, 'key', 'val')
     self.assertEqual(k8s._get_dict_path(d, 'key'), 'val')
 def test_set_get_dict_path_simple(self):
     d = {}
     k8s._set_dict_path(d, 'key', 'val')
     self.assertEqual(k8s._get_dict_path(d, 'key'), 'val')
Ejemplo n.º 4
0
 def test_set_get_dict_path(self):
     d = {}
     k8s._set_dict_path(d, [1, 2, 3], 4)
     self.assertEqual(d, {1: {2: {3: 4}}})
     self.assertEqual(k8s._get_dict_path(d, (1, 2, 3)), 4)
 def test_set_get_dict_path(self):
     d = {}
     k8s._set_dict_path(d, [1,2,3], 4)
     self.assertEqual(d, {1:{2:{3:4}}})
     self.assertEqual(k8s._get_dict_path(d, (1,2,3)), 4)