# HG changeset patch # User Georges Racinet <georges.racinet@octobus.net> # Date 1679618435 -3600 # Fri Mar 24 01:40:35 2023 +0100 # Node ID cb76ad344b9b845cd1511f8ae3a562dfbcb201c2 # Parent f4e5c429582de9e3bde3f2e3b218a2f9b21b9a1d Gitaly Comparison tests: support repeated sha request fields Reflection with `isinstance` is good enough, but for the sake of symmetry with responses we should perhaps add brackets to the specification, as in `request_sha_attrs='oids[]` diff --git a/tests_with_gitaly/comparison.py b/tests_with_gitaly/comparison.py --- a/tests_with_gitaly/comparison.py +++ b/tests_with_gitaly/comparison.py @@ -211,7 +211,10 @@ sha = hg_kwargs.get(sha_attr) if sha is None: continue - git_kwargs[sha_attr] = self.revspec_to_git(sha) + if isinstance(sha, list): + git_kwargs[sha_attr] = [self.revspec_to_git(s) for s in sha] + else: + git_kwargs[sha_attr] = self.revspec_to_git(sha) return git_kwargs def revspec_to_git(self, revspec):