示例#1
0
def test_token_auth():
    session = OSFSession()
    session.token_auth('asdfg')
    assert 'Authorization' in session.headers
示例#2
0
def test_token_auth():
    session = OSFSession()
    session.token_auth('0123456789abcd')
    assert session.auth is None
    assert session.headers['Authorization'] == 'Bearer 0123456789abcd'