def test_iteration(self):
        expected_response = "pycon 2008..."
        handler = self.start_server([(200, [], expected_response)])
        try:
            data = urllib2.urlopen("http://localhost:%s" % handler.port)
            for line in data:
                self.assertEqual(line, expected_response)
        finally:
            self.server.stop()
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_urllib2_localnet.py/TestUrlopen.test_iteration/original