def test_web_app_server(self):
        response = urllib2.urlopen('http://localhost:11111')
        self.assertEqual("hello world", response.read())
        response.close()
        with open(self.manage) as f:
            new_code = f.read().replace('world', 'iktomi')
        with open(self.manage, "w") as f:
            f.write(new_code)
        sleep(2) # wait until code changes
        response = urllib2.urlopen('http://localhost:11111')
        self.assertEqual("hello iktomi", response.read())
        response.close()
        # test if bootstrap worked correctly
        self.assertTrue(os.path.isfile('temp_dir/hello.log'))
        with open('temp_dir/hello.log') as log:
            'Devserver is running on port 11111' in log.read()
dataset/ETHPy150Open SmartTeleMax/iktomi/tests/cli/app.py/WebAppServerTest.test_web_app_server/original