示例#1
0
def test_find_users(session):  # pylint: disable=unused-argument
    """Assert that a list of users can be retrieved and searched on."""
    factory_user_model()

    factory_user_model(user_info=TestUserInfo.user2)

    users = UserService.find_users(last_name='User')
    assert users is not None
    assert len(users) == 2
示例#2
0
def test_find_users(session):  # pylint: disable=unused-argument
    """Assert that a list of users can be retrieved and searched on."""
    factory_user_model(username='******',
                       firstname='Test',
                       lastname='User',
                       roles='{edit,uma_authorization,basic}',
                       keycloak_guid='1b20db59-19a0-4727-affe-c6f64309fd04')

    factory_user_model(username='******',
                       firstname='Test 2',
                       lastname='User',
                       roles='{edit,uma_authorization,basic}',
                       keycloak_guid='1b20db59-19a0-4727-affe-c6f64309fd05')

    users = UserService.find_users(last_name='User')
    assert users is not None
    assert len(users) == 2