Ejemplo n.º 1
0
 def test_element_resolve(self):
     vocab = resource_vocabulary()
     self.assertEqual(
         ElementSchema.resolve(vocab, 'mode.periodic').type, 'periodic')
     self.assertEqual(ElementSchema.resolve(vocab, 'aws.ec2').type, 'ec2')
     self.assertEqual(
         ElementSchema.resolve(vocab, 'aws.ec2.actions.stop').type, 'stop')
     self.assertRaises(ValueError, ElementSchema.resolve, vocab,
                       'aws.ec2.actions.foo')
Ejemplo n.º 2
0
 def resolve(cls, schema_path):
     return ElementSchema.resolve(cls.vocabulary, schema_path)