def test_role(self): """ Instanciate a Bonita role """ xml = build_bonita_role_xml('role uuid','role name',description='a role desc',label='a role label',dbid='dbid-1234') role = BonitaRole._instanciate_from_xml(xml) assert isinstance(role,BonitaRole) assert role.uuid == u'role uuid' assert role.name == u'role name' assert role.description == u'a role desc' assert role.label == u'a role label' assert role.dbid == u'dbid-1234'
def test_invalid_xml(self): """ Try to instanciate a BonitaRole from invalid XML """ xml = '<coucou>une valeur</coucou>' role = BonitaRole._instanciate_from_xml(xml)