Skip to content

Commit 0c1ef48

Browse files
committed
tests: Validate unescaped arguments
In commit 6f045bb, we modified the various 'git-am' wrappers so that additional arguments to be passed to 'git-am' did not need to be escaped, such that: git-am apply 123 -- --signoff would become: git-am apply 123 --signoff Modify the unit tests for these commands to validate this behavior. We don't bother validating the older behavior as this is standard *nix behavior. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 4c3f77c commit 0c1ef48

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/test_bundle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_apply_with_args(self, mock_git_am, mock_download,
8383
mock_download.return_value = 'test.patch'
8484

8585
runner = CLIRunner()
86-
result = runner.invoke(bundle.apply_cmd, ['123', '--', '-3'])
86+
result = runner.invoke(bundle.apply_cmd, ['123', '-3'])
8787

8888
assert result.exit_code == 0, result
8989
mock_get_bundle.assert_called_once_with('123')

tests/test_patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_apply_with_args(self, mock_git_am, mock_download, mock_detail):
6464
mock_download.return_value = object()
6565

6666
runner = CLIRunner()
67-
result = runner.invoke(patch.apply_cmd, ['123', '--', '-3'])
67+
result = runner.invoke(patch.apply_cmd, ['123', '-3'])
6868

6969
assert result.exit_code == 0, result
7070
mock_detail.assert_called_once_with('patches', 123)

tests/test_series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_apply_with_args(self, mock_git_am, mock_download, mock_detail):
3434
mock_download.return_value = 'test.patch'
3535

3636
runner = CLIRunner()
37-
result = runner.invoke(series.apply_cmd, ['123', '--', '-3'])
37+
result = runner.invoke(series.apply_cmd, ['123', '-3'])
3838

3939
assert result.exit_code == 0, result
4040
mock_detail.assert_called_once_with('series', 123)

0 commit comments

Comments
 (0)