~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/test/test_urllib.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        for line in self.returned_obj.__iter__():
95
95
            self.assertEqual(line, self.text)
96
96
 
97
 
 
98
97
class ProxyTests(unittest.TestCase):
99
98
 
100
99
    def setUp(self):
101
100
        # Records changes to env vars
102
101
        self.env = test_support.EnvironmentVarGuard()
103
102
        # Delete all proxy related env vars
104
 
        for k, v in os.environ.iteritems():
 
103
        for k in os.environ.keys():
105
104
            if 'proxy' in k.lower():
106
105
                self.env.unset(k)
107
106
 
592
591
        self.assertEqual(DummyURLopener().open(
593
592
            'spam://example/ /'),'//example/%20/')
594
593
 
 
594
        # test the safe characters are not quoted by urlopen
 
595
        self.assertEqual(DummyURLopener().open(
 
596
            "spam://c:|windows%/:=&?~#+!$,;'@()*[]|/path/"),
 
597
            "//c:|windows%/:=&?~#+!$,;'@()*[]|/path/")
 
598
 
595
599
 
596
600
# Just commented them out.
597
601
# Can't really tell why keep failing in windows and sparc.