~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: John Arbash Meinel
  • Date: 2006-05-02 20:46:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060502204611-02caa5c20fb84ef8
Moved url functions into bzrlib.urlutils

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
                           InvalidURL)
32
32
from bzrlib.osutils import getcwd
33
33
from bzrlib.tests import TestCaseInTempDir, TestSkipped
34
 
from bzrlib.transport import memory, urlescape
 
34
from bzrlib.transport import memory
35
35
import bzrlib.transport
 
36
import bzrlib.urlutils as urlutils
36
37
 
37
38
 
38
39
def _append(fn, txt):
114
115
        self.build_tree(files, transport=t)
115
116
        self.assertEqual(True, t.has('a'))
116
117
        self.assertEqual(False, t.has('c'))
117
 
        self.assertEqual(True, t.has(urlescape('%')))
 
118
        self.assertEqual(True, t.has(urlutils.escape('%')))
118
119
        self.assertEqual(list(t.has_multi(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])),
119
120
                [True, True, False, False, True, False, True, False])
120
121
        self.assertEqual(True, t.has_any(['a', 'b', 'c']))
121
 
        self.assertEqual(False, t.has_any(['c', 'd', 'f', urlescape('%%')]))
 
122
        self.assertEqual(False, t.has_any(['c', 'd', 'f', urlutils.escape('%%')]))
122
123
        self.assertEqual(list(t.has_multi(iter(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']))),
123
124
                [True, True, False, False, True, False, True, False])
124
125
        self.assertEqual(False, t.has_any(['c', 'c', 'c']))
927
928
        for fname in files:
928
929
            fname_utf8 = fname.encode('utf-8')
929
930
            contents = 'contents of %s\n' % (fname_utf8,)
930
 
            self.check_transport_contents(contents, t, urlescape(fname))
 
931
            self.check_transport_contents(contents, t, urlutils.escape(fname))
931
932
 
932
933
    def test_connect_twice_is_same_content(self):
933
934
        # check that our server (whatever it is) is accessable reliably