示例#1
0
文件: test_simple.py 项目: em-2/em2
async def test_invalid_public_key():
    auth = SimpleAuthenticator()
    auth.public_key_value = 'whatever'
    auth._now_unix = lambda: TS

    with pytest.raises(FailedInboundAuthentication) as excinfo:
        await auth.authenticate_platform(PLATFORM, TIMESTAMP, VALID_SIGNATURE)
    assert excinfo.value.args[0] == 'RSA key format is not supported'