def test_geturl(self):
        # Make sure same URL as opened is returned by geturl.
        handler = self.start_server([(200, [], "we don't care")])

        try:
            open_url = urllib2.urlopen("http://localhost:%s" % handler.port)
            url = open_url.geturl()
            self.assertEqual(url, "http://localhost:%s" % handler.port)
        finally:
            self.server.stop()
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_urllib2_localnet.py/TestUrlopen.test_geturl/original