def test_ping(client: Client): with client: client.set_expected_responses([messages.Success]) res = client.ping("random data") assert res == "random data" with client: client.set_expected_responses([ messages.ButtonRequest( code=messages.ButtonRequestType.ProtectCall), messages.Success, ]) res = client.ping("random data", button_protection=True) assert res == "random data"
def test_ping(client: Client): _assert_protection(client, pin=False, passphrase=False) with client: client.set_expected_responses( [messages.ButtonRequest, messages.Success]) client.ping("msg", True)