From 0dfa1095b3e051ea9967985ad9b93773a7b35ae2 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Tue, 11 Jun 2024 14:45:07 +0000 Subject: [PATCH] run client compat tests with git protocol version 0, too --- tests/compat/test_client.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/compat/test_client.py b/tests/compat/test_client.py index 4535db8f6..c0fc30de7 100644 --- a/tests/compat/test_client.py +++ b/tests/compat/test_client.py @@ -47,6 +47,8 @@ run_git_or_fail, ) +from unittest.mock import patch + if sys.platform == "win32": import ctypes @@ -422,6 +424,11 @@ def test_send_remove_branch(self): self.skipTest("skip flaky test; see #1015") +@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0) +class DulwichTCPClientTestGitProtov0(DulwichTCPClientTest): + pass + + class TestSSHVendor: @staticmethod def run_command( @@ -472,6 +479,11 @@ def _build_path(self, path): return self.gitroot + path +@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0) +class DulwichMockSSHClientTestGitProtov0(DulwichMockSSHClientTest): + pass + + class DulwichSubprocessClientTest(CompatTestCase, DulwichClientTestBase): def setUp(self): CompatTestCase.setUp(self) @@ -488,6 +500,11 @@ def _build_path(self, path): return self.gitroot + path +@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0) +class DulwichSubprocessClientTestGitProtov0(DulwichSubprocessClientTest): + pass + + class GitHTTPRequestHandler(http.server.SimpleHTTPRequestHandler): """HTTP Request handler that calls out to 'git http-backend'.""" @@ -674,3 +691,8 @@ def _build_path(self, path): def test_archive(self): raise SkipTest("exporting archives not supported over http") + + +@patch("dulwich.protocol.DEFAULT_GIT_PROTOCOL_VERSION_FETCH", new=0) +class DulwichHttpClientTestGitProtov0(DulwichHttpClientTest): + pass