def test_finish_deployment_thorough(self):
        """
        test_finish_deployment_thorough: Tests that every step can be done, and the deployment finished.
        Checks that after being configured, Apache is indeed serving the new instance correctly.
        PRERREQUISITES: apache-reloader and weblab-starter scripts running; apache2 configured correctly to load the instances.
        """
        settings = prepare_system("testuser@testuser.com", "admin", "Administrador", "password", "admin@admin.com",
            self.wcloud_settings)
        self._settings = settings
        base_url = os.path.join(flask_app.config["DIR_BASE"], settings[Creation.BASE_URL])
        creation_results = create_weblab_environment(base_url, settings)
        configure_web_server(creation_results)
        register_and_start_instance("testuser@testuser.com", self.wcloud_settings)

        start_port, end_port = creation_results["start_port"], creation_results["end_port"]
        finish_deployment("testuser@testuser.com", settings, start_port, end_port, self.wcloud_settings)

        # Check that the new instance is being served correctly.
        bot = requests.Session()
        r = bot.get("http://localhost/testentity/weblab/client/index.html")
        text = r.text
        print text
        assert "weblabclientlab" in text
        assert "input" in text
        assert "hiddenPassword" in text

        # Check that we can login with admin/password.
        r = bot.post("http://localhost/testentity/weblab/login/json/", data="""{"params":{"username":"admin", "password":"password"}, "method":"login"}""")
        str = r.text
        print "The request returned: " + str
        j = json.loads(str)
        assert not j["is_exception"]
        assert "id" in j["result"]
dataset/ETHPy150Open weblabdeusto/weblabdeusto/tools/wcloud/wcloud/test/test_wcloud_tasks.py/TestWcloudTasks.test_finish_deployment_thorough/original