dulwich.tests.compat.test_client module

Compatibility tests between the Dulwich client and the cgit server.

class dulwich.tests.compat.test_client.DulwichClientTestBase

Bases: object

Tests for client/server compatibility.

assertDestEqualsSrc()
compute_send(src)
disable_ff_and_make_dummy_commit()
make_dummy_commit(dest)
setUp()
tearDown()
test_archive()
test_fetch_empty_pack()
test_fetch_pack()
test_fetch_pack_depth()
test_fetch_pack_no_side_band_64k()
test_fetch_pack_zero_sha()
test_get_refs()
test_incremental_fetch_pack()
test_repeat()
test_send_new_branch_empty_pack()
test_send_pack()
test_send_pack_from_shallow_clone()
test_send_pack_multiple_errors()
test_send_pack_nothing_to_send()
test_send_pack_one_error()
test_send_remove_branch()
test_send_without_report_status()
class dulwich.tests.compat.test_client.DulwichHttpClientTest(methodName='runTest')

Bases: CompatTestCase, DulwichClientTestBase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

min_git_version: Tuple[int, ...] = (1, 7, 0, 2)
setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_archive()
class dulwich.tests.compat.test_client.DulwichMockSSHClientTest(methodName='runTest')

Bases: CompatTestCase, DulwichClientTestBase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

class dulwich.tests.compat.test_client.DulwichSubprocessClientTest(methodName='runTest')

Bases: CompatTestCase, DulwichClientTestBase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

class dulwich.tests.compat.test_client.DulwichTCPClientTest(methodName='runTest')

Bases: CompatTestCase, DulwichClientTestBase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_send_remove_branch()
class dulwich.tests.compat.test_client.GitHTTPRequestHandler(*args, directory=None, **kwargs)

Bases: SimpleHTTPRequestHandler

HTTP Request handler that calls out to ‘git http-backend’.

do_GET()

Serve a GET request.

do_POST()
log_request(code='-', size='-')

Log an accepted request.

This is called by send_response().

rbufsize = 0
run_backend()

Call out to git http-backend.

send_head()

Common code for GET and HEAD commands.

This sends the response code and MIME headers.

Return value is either a file object (which has to be copied to the outputfile by the caller unless the command was HEAD, and must be closed by the caller under all circumstances), or None, in which case the caller has nothing further to do.

class dulwich.tests.compat.test_client.HTTPGitServer(server_address, root_path)

Bases: HTTPServer

Constructor. May be extended, do not override.

allow_reuse_address = True
get_url()
class dulwich.tests.compat.test_client.TestSSHVendor

Bases: object

static run_command(host, command, username=None, port=None, password=None, key_filename=None)