Forráskód Böngészése

run client compat tests with git protocol version 0, too

Stefan Sperling 9 hónapja
szülő
commit
0e18ede32f
1 módosított fájl, 21 hozzáadás és 0 törlés
  1. 21 0
      tests/compat/test_client.py

+ 21 - 0
tests/compat/test_client.py

@@ -33,6 +33,7 @@ import tempfile
 import threading
 from contextlib import suppress
 from io import BytesIO
+from unittest.mock import patch
 from urllib.parse import unquote
 
 from dulwich import client, file, index, objects, protocol, repo
@@ -422,6 +423,11 @@ class DulwichTCPClientTest(CompatTestCase, DulwichClientTestBase):
         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 +478,11 @@ class DulwichMockSSHClientTest(CompatTestCase, DulwichClientTestBase):
         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 +499,11 @@ class DulwichSubprocessClientTest(CompatTestCase, DulwichClientTestBase):
         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 +690,8 @@ class DulwichHttpClientTest(CompatTestCase, DulwichClientTestBase):
 
     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