/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_transport.py

Start adding a RemoteBzrDir, etc

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
    def setUp(self):
45
45
        super(TCPClientTests, self).setUp()
 
46
        # We're allowed to set  the transport class here, so that we don't use
 
47
        # the default or a parameterized class, but rather use the
 
48
        # TestCaseWithTransport infrastructure to set up a smart server and
 
49
        # transport.
 
50
        #
 
51
        # At the momen the SmartServer transport is only readonly, but
 
52
        # TestCaseWithTransport tries to make sure the transport is writable.
46
53
        self.transport_readonly_server = smart.SmartTCPServer_for_testing
47
54
 
48
55
    def test_plausible_url(self):
49
56
        self.assert_(self.get_readonly_url().startswith('bzr://'))
50
57
 
 
58
    def test_probe_transport(self):
 
59
        t = self.get_readonly_transport()
 
60
        self.assertIsInstance(t, smart.SmartTransport)
 
61
 
51
62
    def test_get_client_from_transport(self):
52
63
        t = self.get_readonly_transport()
53
64
        client = t.get_smart_client()
54
65
        self.assertIsInstance(client, smart.SmartStreamClient)
55
66
 
56
67
 
57
 
 
58
68
class BasicSmartTests(tests.TestCase):
59
69
    
60
70
    def test_smart_query_version(self):