예제 #1
0
 def test_manifest_insntace_factory(self):
     json_name, json_value = {'foo':'bar'},{'baz':'fuzz'}
     with self.assertRaises(Exception):
        x = ManifestConstruction._from_json(None,json_name, json_value)
     mock_parent = mock.Mock()
     mock_parent.manifest  = mock.Mock()
     mock_parent.manifest.base  = mock.Mock()
     x = ManifestConstruction._from_json(mock_parent,json_name,{}) 
     x.validate()
예제 #2
0
 def test_manifest_construction(self):
     x = ManifestConstruction(None,None)
     self.assertEquals(x.manifest,None)
     self.assertEquals(x.name,'Unnamed Manifest Item')
     with self.assertRaises(Exception):
         x.validate() # invalid, no parent manifest with a 'base' value