Example #1
0
def test_get_credentials_from_basic_valid():
    username = '******'
    password = '******'
    signature = '{0}:{1}'.format(username, password)
    encoded_signature = signature.encode('base64')
    credentials = authorization.get_credentials_from_basic(encoded_signature)

    assert credentials.id == username
    assert credentials.secret == password
Example #2
0
def test_get_credentials_from_basic_invalid():
    authorization.get_credentials_from_basic('')