|
@@ -31,7 +31,6 @@ from dulwich.server import (
|
|
|
ReceivePackHandler,
|
|
|
)
|
|
|
from dulwich.tests.utils import (
|
|
|
- skipIfPY3,
|
|
|
tear_down_repo,
|
|
|
)
|
|
|
from dulwich.tests.compat.utils import (
|
|
@@ -67,7 +66,6 @@ def _get_shallow(repo):
|
|
|
return shallows
|
|
|
|
|
|
|
|
|
-@skipIfPY3
|
|
|
class ServerTests(object):
|
|
|
"""Base tests for testing servers.
|
|
|
|
|
@@ -117,7 +115,7 @@ class ServerTests(object):
|
|
|
cwd=self._new_repo.path)
|
|
|
|
|
|
self.assertEqual(
|
|
|
- self._old_repo.get_refs().keys(), ["refs/heads/branch"])
|
|
|
+ list(self._old_repo.get_refs().keys()), [b"refs/heads/branch"])
|
|
|
|
|
|
def test_fetch_from_dulwich(self):
|
|
|
self.import_repos()
|
|
@@ -160,7 +158,7 @@ class ServerTests(object):
|
|
|
self._repo = self.import_repo('server_old.export')
|
|
|
port = self._start_server(self._repo)
|
|
|
o = run_git_or_fail(['ls-remote', self.url(port)])
|
|
|
- self.assertEqual(len(o.split('\n')), 4)
|
|
|
+ self.assertEqual(len(o.split(b'\n')), 4)
|
|
|
|
|
|
def test_new_shallow_clone_from_dulwich(self):
|
|
|
require_git_version(self.min_single_branch_version)
|
|
@@ -173,8 +171,8 @@ class ServerTests(object):
|
|
|
run_git_or_fail(['clone', '--mirror', '--depth=1', '--no-single-branch',
|
|
|
self.url(port), self._stub_repo.path])
|
|
|
clone = self._stub_repo = Repo(self._stub_repo.path)
|
|
|
- expected_shallow = ['94de09a530df27ac3bb613aaecdd539e0a0655e1',
|
|
|
- 'da5cd81e1883c62a25bb37c4d1f8ad965b29bf8d']
|
|
|
+ expected_shallow = [b'94de09a530df27ac3bb613aaecdd539e0a0655e1',
|
|
|
+ b'da5cd81e1883c62a25bb37c4d1f8ad965b29bf8d']
|
|
|
self.assertEqual(expected_shallow, _get_shallow(clone))
|
|
|
self.assertReposNotEqual(clone, self._source_repo)
|
|
|
|
|
@@ -194,8 +192,8 @@ class ServerTests(object):
|
|
|
run_git_or_fail(
|
|
|
['fetch', '--depth=1', self.url(port)] + self.branch_args(),
|
|
|
cwd=self._stub_repo.path)
|
|
|
- expected_shallow = ['94de09a530df27ac3bb613aaecdd539e0a0655e1',
|
|
|
- 'da5cd81e1883c62a25bb37c4d1f8ad965b29bf8d']
|
|
|
+ expected_shallow = [b'94de09a530df27ac3bb613aaecdd539e0a0655e1',
|
|
|
+ b'da5cd81e1883c62a25bb37c4d1f8ad965b29bf8d']
|
|
|
self.assertEqual(expected_shallow, _get_shallow(clone))
|
|
|
self.assertReposNotEqual(clone, self._source_repo)
|
|
|
|
|
@@ -233,7 +231,7 @@ class NoSideBand64kReceivePackHandler(ReceivePackHandler):
|
|
|
@classmethod
|
|
|
def capabilities(cls):
|
|
|
return tuple(c for c in ReceivePackHandler.capabilities()
|
|
|
- if c != 'side-band-64k')
|
|
|
+ if c != b'side-band-64k')
|
|
|
|
|
|
|
|
|
def ignore_error(error):
|