dulwich.tests.test_server module

Tests for the smart protocol server.

class dulwich.tests.test_server.AckGraphWalkerImplTestCase(methodName='runTest')

Bases: dulwich.tests.TestCase

Base setup and asserts for AckGraphWalker tests.

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.

assertAck(sha, ack_type=b'')
assertAcks(acks)
assertNak()
assertNextEmpty()
assertNextEquals(sha)
assertNoAck()
setUp()

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

class dulwich.tests.test_server.DictBackendTests(methodName='runTest')

Bases: dulwich.tests.TestCase

Tests for DictBackend.

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.

test_bad_repo_path()
test_nonexistant()
class dulwich.tests.test_server.FileSystemBackendTests(methodName='runTest')

Bases: dulwich.tests.TestCase

Tests for FileSystemBackend.

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.

test_absolute()
test_bad_repo_path()
test_child()
test_nonexistant()
class dulwich.tests.test_server.FindShallowTests(methodName='runTest')

Bases: dulwich.tests.TestCase

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.

assertSameElements(expected, actual)
make_commit(**attrs)
make_linear_commits(n, message=b'')
setUp()

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

test_linear()
test_merge()
test_multiple_independent()
test_multiple_overlapping()
test_tag()
class dulwich.tests.test_server.HandlerTestCase(methodName='runTest')

Bases: dulwich.tests.TestCase

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.

assertSucceeds(func, *args, **kwargs)
setUp()

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

test_capability_line()
test_has_capability()
test_set_client_capabilities()
class dulwich.tests.test_server.MultiAckDetailedGraphWalkerImplTestCase(methodName='runTest')

Bases: dulwich.tests.test_server.AckGraphWalkerImplTestCase

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.

impl_cls

alias of dulwich.server.MultiAckDetailedGraphWalkerImpl

test_multi_ack()
test_multi_ack_flush()
test_multi_ack_flush_end()
test_multi_ack_flush_end_nodone()
test_multi_ack_nak()
test_multi_ack_nak_flush()
test_multi_ack_nak_nodone()
test_multi_ack_nodone()
test_multi_ack_partial()
test_multi_ack_stateless()
test_multi_ack_stateless_nodone()
class dulwich.tests.test_server.MultiAckGraphWalkerImplTestCase(methodName='runTest')

Bases: dulwich.tests.test_server.AckGraphWalkerImplTestCase

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.

impl_cls

alias of dulwich.server.MultiAckGraphWalkerImpl

test_multi_ack()
test_multi_ack_flush()
test_multi_ack_nak()
test_multi_ack_partial()
class dulwich.tests.test_server.ProtocolGraphWalkerEmptyTestCase(methodName='runTest')

Bases: dulwich.tests.TestCase

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.

test_empty_repository()
class dulwich.tests.test_server.ProtocolGraphWalkerTestCase(methodName='runTest')

Bases: dulwich.tests.TestCase

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.

assertReceived(expected)
setUp()

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

test_all_wants_satisfied()
test_all_wants_satisfied_have_branch()
test_all_wants_satisfied_have_root()
test_all_wants_satisfied_no_haves()
test_determine_wants()
test_determine_wants_advertisement()
test_handle_shallow_request_no_client_shallows()
test_handle_shallow_request_no_new_shallows()
test_handle_shallow_request_unshallows()
test_split_proto_line()
class dulwich.tests.test_server.ReceivePackHandlerTestCase(methodName='runTest')

Bases: dulwich.tests.TestCase

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.

test_apply_pack_del_ref()
class dulwich.tests.test_server.ServeCommandTests(methodName='runTest')

Bases: dulwich.tests.TestCase

Tests for serve_command.

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.

serve_command(handler_cls, args, inf, outf)
setUp()

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

test_receive_pack()
class dulwich.tests.test_server.SingleAckGraphWalkerImplTestCase(methodName='runTest')

Bases: dulwich.tests.test_server.AckGraphWalkerImplTestCase

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.

impl_cls

alias of dulwich.server.SingleAckGraphWalkerImpl

test_single_ack()
test_single_ack_flush()
test_single_ack_nak()
test_single_ack_nak_flush()
class dulwich.tests.test_server.TestGenericPackHandler

Bases: dulwich.server.PackHandler

classmethod capabilities()
classmethod required_capabilities()

Return a list of capabilities that we require the client to have.

class dulwich.tests.test_server.TestProto

Bases: object

get_received_line(band=0)
read_pkt_line()
set_output(output_lines)
write_pkt_line(data)
write_sideband(band, data)
class dulwich.tests.test_server.TestProtocolGraphWalker

Bases: object

all_wants_satisfied(haves)
handle_done()
notify_done()
pop_ack()
read_proto_line(allowed)
send_ack(sha, ack_type=b'')
send_nak()
class dulwich.tests.test_server.TestUploadPackHandler(backend, args, proto, stateless_rpc=None, advertise_refs=False)

Bases: dulwich.server.UploadPackHandler

classmethod required_capabilities()

Return a list of capabilities that we require the client to have.

class dulwich.tests.test_server.UpdateServerInfoTests(methodName='runTest')

Bases: dulwich.tests.TestCase

Tests for update_server_info.

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.

test_empty()
test_simple()
class dulwich.tests.test_server.UploadPackHandlerTestCase(methodName='runTest')

Bases: dulwich.tests.TestCase

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.

test_get_tagged()
test_no_progress()
test_nothing_to_do_but_wants()
test_nothing_to_do_no_wants()
test_progress()