Exemplo n.º 1
0
 def test_strip_resource_with_stripping_function(self):
     metadata = {}
     t_test = t_transformers.Transformer()
     result = t_test.strip_resource_data('network', metadata)
     self.assertEqual({'test': 'ok'}, result)
Exemplo n.º 2
0
 def test_strip_resource_with_no_rules(self):
     metadata = copy.deepcopy(samples.COMPUTE_METADATA)
     t_test = t_transformers.Transformer()
     result = t_test.strip_resource_data('unknown', metadata)
     self.assertEqual(samples.COMPUTE_METADATA, result)
Exemplo n.º 3
0
 def test_strip_resource_with_func(self):
     metadata = {'test': 'dummy'}
     t_test = t_transformers.Transformer()
     result = t_test.strip_resource_data('test', metadata)
     self.assertEqual({'test': 'ok'}, result)
Exemplo n.º 4
0
 def test_strip_resource_on_dict(self):
     metadata = copy.deepcopy(samples.COMPUTE_METADATA)
     t_test = t_transformers.Transformer()
     result = t_test.strip_resource_data('compute', metadata)
     self.assertEqual(TRANS_METADATA, result)