From 382facf264c89be5d974ef3eabd750fbf222fc42 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Thu, 3 Sep 2020 15:54:35 -0300 Subject: [PATCH] test for duplicated kwargs --- tests/unit/service/test_parser.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/unit/service/test_parser.py b/tests/unit/service/test_parser.py index 45267ee2c..6fcfcb87e 100644 --- a/tests/unit/service/test_parser.py +++ b/tests/unit/service/test_parser.py @@ -33,6 +33,11 @@ class FakeAPI: def thing_update(self, value1: str) -> Wallet: # updated wallet """update command doc""" + def thing_search( + self, + **claim_filter_and_signed_filter_and_stream_filter_and_pagination_kwargs): + """search command doc""" + def thing_delete(self, value1: str, **tx_and_pagination_kwargs) -> Wallet: # deleted thing """ delete command doc @@ -60,6 +65,11 @@ class FakeAPI: class TestParser(TestCase): maxDiff = None + def test_parse_does_not_duplicate_arguments(self): + parsed = parse_method(FakeAPI.thing_search, get_expanders()) + names = [arg['name'] for arg in parsed['arguments']] + self.assertEqual(len(names), len(set(names))) + def test_parse_method(self): expanders = get_expanders() self.assertEqual(