~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_transport.py

  • Committer: Martin
  • Date: 2011-03-02 20:39:58 UTC
  • mto: This revision was merged to the branch mainline in revision 5694.
  • Revision ID: gzlist@googlemail.com-20110302203958-ky3qss741ljo5f0f
Store exception name after initial 'error' slot as suggested in review

Show diffs side-by-side

added added

removed removed

Lines of Context:
2412
2412
        self.assertEqual('aaa', stream.next())
2413
2413
        self.assertEqual('bbb', stream.next())
2414
2414
        exc = self.assertRaises(errors.ErrorFromSmartServer, stream.next)
2415
 
        self.assertEqual(('Exception', 'Boom!'), exc.error_tuple)
 
2415
        self.assertEqual(('error', 'Exception', 'Boom!'), exc.error_tuple)
2416
2416
 
2417
2417
    def test_interrupted_by_connection_lost(self):
2418
2418
        interrupted_body_stream = (
2815
2815
    'b\x00\x00\x00\x03aaa' # body part ('aaa')
2816
2816
    'b\x00\x00\x00\x03bbb' # body part ('bbb')
2817
2817
    'oE' # status flag (error)
2818
 
    's\x00\x00\x00\x14l9:Exception5:Boom!e' # err struct ('Exception', 'Boom!')
 
2818
    # err struct ('error', 'Exception', 'Boom!')
 
2819
    's\x00\x00\x00\x1bl5:error9:Exception5:Boom!e'
2819
2820
    'e' # EOM
2820
2821
    )
2821
2822