Example #1
0
    def test_not_found_group_by_uuid(self):
        """ Try to retrieve group but nothing found with given key """
        # Setup the response for MockServer
        BonitaServer.use('localhost', 9090, 'restuser', 'restbpm')
        url = '/identityAPI/getGroupByUUID'
        code = 500
        xml = build_dumb_bonita_error_body('GroupNotFoundException',message='can\'t find Group: unknown')
        BonitaServer.set_response_list([[url,code,xml]])

        group = BonitaGroup.get(uuid='unknown')

        assert group == None
Example #2
0
    def test_get_group_by_path(self):
        """ Retrieve a group with path """
        # Setup the response for MockServer
        BonitaServer.use('localhost', 9090, 'restuser', 'restbpm')
        url = '/identityAPI/getGroupUsingPath'
        code = 200
        xml = build_bonita_group_xml(uuid='996633',name='mygroup')
        BonitaServer.set_response_list([[url,code,xml]])

        group = BonitaGroup.get(path='/mygroup')

        assert isinstance(group,BonitaGroup)
        assert group.name == 'mygroup'
Example #3
0
 def test_unknown_param(self):
     """ Try to retrieve group but gives an unknown param """
     BonitaGroup.get(unknown_param='32')