From ae67b10c039678fdac46e7ad954da392f2c1caf6 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 8 Jul 2019 11:21:08 -0400 Subject: [PATCH] Validate arguments to the remote method in the test suite. --- .../tests/test_storage_protocol.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/_secureaccesstokenauthorizer/tests/test_storage_protocol.py b/src/_secureaccesstokenauthorizer/tests/test_storage_protocol.py index 8e17be2..a2fdbef 100644 --- a/src/_secureaccesstokenauthorizer/tests/test_storage_protocol.py +++ b/src/_secureaccesstokenauthorizer/tests/test_storage_protocol.py @@ -92,10 +92,14 @@ class LocalRemote(object): _referenceable = attr.ib() def callRemote(self, methname, *args, **kwargs): + schema = self._referenceable.getInterface()[methname] + schema.checkAllArgs(args, kwargs, inbound=False) + # TODO: Figure out how to call checkResults on the result. return execute( - getattr(self._referenceable, "remote_" + methname), - *args, - **kwargs + self._referenceable.doRemoteCall, + methname, + args, + kwargs, ) -- GitLab