Example #1
0
 def test_strip_resource_with_attributes(self):
     test_obj = t_transformers.EmptyClass()
     test_obj.metadata = t_transformers.ClassWithAttr()
     t_test = t_transformers.TransformerMeta()
     result = t_test.strip_resource_data('compute', test_obj)
     self.assertEqual(TRANS_METADATA, result)
Example #2
0
 def test_strip_resource_with_subitem(self):
     test_obj = t_transformers.EmptyClass()
     test_obj.metadata = copy.deepcopy(samples.COMPUTE_METADATA)
     t_test = t_transformers.TransformerMeta()
     result = t_test.strip_resource_data('compute', test_obj)
     self.assertEqual(TRANS_METADATA, result)