Beispiel #1
0
def test_getVerkey_invalid_identifier(node):
    token_authnr = TokenAuthNr(ACCEPTABLE_WRITE_TYPES, ACCEPTABLE_QUERY_TYPES,
                               ACCEPTABLE_ACTION_TYPES,
                               node[0].db_manager.idr_cache)
    identifier_invalid = 'INVALID_IDENTIFIER'
    with pytest.raises(UnknownIdentifier):
        token_authnr.getVerkey(identifier_invalid, Request())
Beispiel #2
0
def test_getVerkey_success(node):
    token_authnr = TokenAuthNr(ACCEPTABLE_WRITE_TYPES, ACCEPTABLE_QUERY_TYPES,
                               ACCEPTABLE_ACTION_TYPES,
                               node[0].db_manager.idr_cache)
    ver_key = token_authnr.getVerkey(VALID_IDENTIFIER, Request())
    assert len(ver_key) == 23
    assert ver_key[0] == '~'
Beispiel #3
0
def test_getVerkey_pay_address_success(node):
    token_authnr = TokenAuthNr(ACCEPTABLE_WRITE_TYPES, ACCEPTABLE_QUERY_TYPES,
                               ACCEPTABLE_ACTION_TYPES,
                               node[0].db_manager.idr_cache)
    # TODO change these to indicate they are addresses
    identifier_43 = 'sjw1ceG7wtym3VcnyaYtf1xo37gCUQHDR5VWcKWNPLRZ1X8eC'
    ver_key = token_authnr.getVerkey(identifier_43, Request())
    assert ver_key == '8kjqqnF3m6agp9auU7k4TWAhuGygFAgPzbNH3shp4HFL'
Beispiel #4
0
def test_getVerkey_invalid_identifier(node):
    token_authnr = TokenAuthNr(node[0].states[DOMAIN_LEDGER_ID])
    identifier_invalid = 'INVALID_IDENTIFIER'
    with pytest.raises(UnknownIdentifier):
        token_authnr.getVerkey(identifier_invalid)
Beispiel #5
0
def test_getVerkey_pay_address_success(node):
    token_authnr = TokenAuthNr(node[0].states[DOMAIN_LEDGER_ID])
    # TODO change these to indicate they are addresses
    identifier_43 = 'sjw1ceG7wtym3VcnyaYtf1xo37gCUQHDR5VWcKWNPLRZ1X8eC'
    ver_key = token_authnr.getVerkey(identifier_43)
    assert ver_key == '8kjqqnF3m6agp9auU7k4TWAhuGygFAgPzbNH3shp4HFL'
Beispiel #6
0
def test_getVerkey_success(node):
    token_authnr = TokenAuthNr(node[0].states[DOMAIN_LEDGER_ID])
    ver_key = token_authnr.getVerkey(VALID_IDENTIFIER)
    assert len(ver_key) == 23
    assert ver_key[0] == '~'