~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-29 11:07:14 UTC
  • mfrom: (5813.1.1 realname-can-be-empty)
  • Revision ID: pqm@pqm.ubuntu.com-20110429110714-wr9f71ea9600lvb6
(jelmer) Allow realname to be empty in tests. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
16
16
 
17
17
 
18
18
from cStringIO import StringIO
19
 
import os
20
19
import subprocess
21
20
import sys
22
21
import threading
564
563
        server = HttpServer()
565
564
        self.start_server(server)
566
565
        t = transport.get_transport('readonly+' + server.get_url())
567
 
        self.failUnless(isinstance(t, readonly.ReadonlyTransportDecorator))
 
566
        self.assertIsInstance(t, readonly.ReadonlyTransportDecorator)
568
567
        self.assertEqual(False, t.listable())
569
568
        self.assertEqual(True, t.is_readonly())
570
569
 
747
746
        self.assertEquals(t._host, 'simple.example.com')
748
747
        self.assertEquals(t._port, None)
749
748
        self.assertEquals(t._path, '/home/source/')
750
 
        self.failUnless(t._user is None)
751
 
        self.failUnless(t._password is None)
 
749
        self.assertTrue(t._user is None)
 
750
        self.assertTrue(t._password is None)
752
751
 
753
752
        self.assertEquals(t.base, 'http://simple.example.com/home/source/')
754
753
 
967
966
            bzr_remote_path = sys.executable + ' ' + self.get_bzr_path()
968
967
        else:
969
968
            bzr_remote_path = self.get_bzr_path()
970
 
        os.environ['BZR_REMOTE_PATH'] = bzr_remote_path
 
969
        self.overrideEnv('BZR_REMOTE_PATH', bzr_remote_path)
971
970
 
972
971
        # Access the branch via a bzr+ssh URL.  The BZR_REMOTE_PATH environment
973
972
        # variable is used to tell bzr what command to run on the remote end.