コード例 #1
0
def test_nym_static_validation_not_authorized_random(nym_request,
                                                     nym_handler: NymHandler):
    nym_request.operation['role'] = randomString()
    with pytest.raises(InvalidClientRequest):
        nym_handler.static_validation(nym_request)
コード例 #2
0
def test_nym_static_validation_failed_with_spaced_dest(
        nym_request, nym_handler: NymHandler):
    nym_request.operation['dest'] = ' ' * 5
    with pytest.raises(InvalidClientRequest):
        nym_handler.static_validation(nym_request)
コード例 #3
0
def test_nym_static_validation_authorized(nym_request,
                                          nym_handler: NymHandler):
    for role in Authoriser.ValidRoles:
        nym_request.operation['role'] = role
        nym_handler.static_validation(nym_request)
コード例 #4
0
def test_nym_static_validation_passes(nym_request, nym_handler: NymHandler):
    nym_handler.static_validation(nym_request)