예제 #1
0
def test_clean_principal_invalid():
    from pyramid_authsanity.policy import _clean_principal
    from pyramid.security import Everyone

    ret = _clean_principal(Everyone)

    assert ret is None
def test_clean_principal_invalid():
    from pyramid_authsanity.policy import _clean_principal
    from pyramid.security import Everyone

    ret = _clean_principal(Everyone)

    assert ret == None
예제 #3
0
def test_clean_principal_valid():
    from pyramid_authsanity.policy import _clean_principal

    ret = _clean_principal('root')

    assert ret == 'root'
def test_clean_principal_valid():
    from pyramid_authsanity.policy import _clean_principal

    ret = _clean_principal('root')

    assert ret == 'root'