~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_transport.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-24 19:21:32 UTC
  • mto: This revision was merged to the branch mainline in revision 5390.
  • Revision ID: john@arbash-meinel.com-20100824192132-2ktt5adkbk5bk1ct
Handle test_source and extensions. Also define an 'extern' protocol, to allow
the test suite to recognize that returning an object of that type is a Python object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
 
252
252
    def test_get_bytes_unknown_file(self):
253
253
        t = self.get_transport()
 
254
 
254
255
        self.assertRaises(NoSuchFile, t.get_bytes, 'c')
255
256
 
256
257
    def test_get_with_open_write_stream_sees_all_content(self):
1265
1266
        self.assertIs(t._get_connection(), c._get_connection())
1266
1267
 
1267
1268
        # Temporary failure, we need to create a new dummy connection
1268
 
        new_connection = None
 
1269
        new_connection = object()
1269
1270
        t._set_connection(new_connection)
1270
1271
        # Check that both transports use the same connection
1271
1272
        self.assertIs(new_connection, t._get_connection())