{"action":"opened","issue":{"url":"https://api.github.com/repos/Pylons/webtest/issues/187","repository_url":"https://api.github.com/repos/Pylons/webtest","labels_url":"https://api.github.com/repos/Pylons/webtest/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/Pylons/webtest/issues/187/comments","events_url":"https://api.github.com/repos/Pylons/webtest/issues/187/events","html_url":"https://github.com/Pylons/webtest/issues/187","id":258086735,"number":187,"title":"Flask app passes webtest TestApp functional tests on Windows locally but fails on Appveyor CI","user":{"login":"bmjjr","id":526707,"avatar_url":"https://avatars0.githubusercontent.com/u/526707?v=4","gravatar_id":"","url":"https://api.github.com/users/bmjjr","html_url":"https://github.com/bmjjr","followers_url":"https://api.github.com/users/bmjjr/followers","following_url":"https://api.github.com/users/bmjjr/following{/other_user}","gists_url":"https://api.github.com/users/bmjjr/gists{/gist_id}","starred_url":"https://api.github.com/users/bmjjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmjjr/subscriptions","organizations_url":"https://api.github.com/users/bmjjr/orgs","repos_url":"https://api.github.com/users/bmjjr/repos","events_url":"https://api.github.com/users/bmjjr/events{/privacy}","received_events_url":"https://api.github.com/users/bmjjr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-15T15:54:08Z","updated_at":"2017-09-15T15:54:08Z","closed_at":null,"author_association":"NONE","body":"I've been fighting a strange problem with a flask app that passes 115 tests locally on windows 10 but always fails on Appveyor, due to the webtest Testapp functional tests. Everything else passes on appveyor but the TestApp tests. By this point, I feel like I've tried everything this week, so I want to check here to see if there are any known issues.\r\n\r\nI've ensured both local and remote appveyor environments are installed from an environment.yml to be the same.\r\n\r\nBelow is the error message for all the failed webtest relevant tests. Basically, the response is none and I don't know why it would be so, it passes fine locally but only fails on appveyor. \r\n\r\nAny input on what could cause this to pass locally but fail on appveyor? Again, only my TestApp tests are giving me a problem and they pass just fine on Travis CI. I'm running flask 0.13.dev0.\r\n\r\n```\r\nERROR at setup of TestCreateContinents.test_submit_delete_when_on_create_continent_with_data \r\ntestapp = <flask_webtest.TestApp object at 0x000001EFDA710668>\r\nadmin_user = <User('user1')>, app = <Flask 'base.app'>\r\n    @pytest.fixture(scope='function')\r\n    def admin_login(testapp, admin_user, app):\r\n        \"\"\"Log in the admin user for the functional tests.\"\"\"\r\n        res = testapp.get(url_for('bqpublic.home'),\r\n                          status=200,\r\n>                         headers={'HOST': 'bq.local:8000'})\r\nUsers\\root\\repos\\aoscrdb_app\\tests\\conftest.py:176: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\webtest\\app.py:331: in get\r\n    expect_errors=expect_errors)\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\flask_webtest.py:224: in do_request\r\n    response = super(TestApp, self).do_request(*args, **kwargs)\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\webtest\\app.py:625: in do_request\r\n    res = req.get_response(app, catch_exc_info=True)\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\webob\\request.py:1312: in send\r\n    application, catch_exc_info=True)\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\webob\\request.py:1280: in call_application\r\n    app_iter = application(self.environ, start_response)\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\webtest\\lint.py:199: in lint_app\r\n    iterator = application(environ, start_response_wrapper)\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\flask\\app.py:2177: in __call__\r\n    return self.wsgi_app(environ, start_response)\r\nMiniconda3-x64\\envs\\pythonocc\\lib\\site-packages\\raven\\middleware.py:98: in __call__\r\n    iterable = self.application(environ, start_response)\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\nself = <Flask 'base.app'>\r\nenviron = {'HTTP_COOKIE': '', 'HTTP_HOST': 'bq.local:8000', 'PATH_INFO': '/app/', 'QUERY_STRING': '', ...}\r\nstart_response = <function middleware.<locals>.lint_app.<locals>.start_response_wrapper at 0x000001EFD9EEE8C8>\r\n    def wsgi_app(self, environ, start_response):\r\n        \"\"\"The actual WSGI application.  This is not implemented in\r\n            `__call__` so that middlewares can be applied without losing a\r\n            reference to the class.  So instead of doing this::\r\n    \r\n                app = MyMiddleware(app)\r\n    \r\n            It's a better idea to do this instead::\r\n    \r\n                app.wsgi_app = MyMiddleware(app.wsgi_app)\r\n    \r\n            Then you still have the original application object around and\r\n            can continue to call methods on it.\r\n    \r\n            .. versionchanged:: 0.7\r\n               The behavior of the before and after request callbacks was changed\r\n               under error conditions and a new callback was added that will\r\n               always execute at the end of the request, independent on if an\r\n               error occurred or not.  See :ref:`callbacks-and-errors`.\r\n    \r\n            :param environ: a WSGI environment\r\n            :param start_response: a callable accepting a status code,\r\n                                   a list of headers and an optional\r\n                                   exception context to start the response\r\n            \"\"\"\r\n        ctx = self.request_context(environ)\r\n        error = None\r\n        try:\r\n            try:\r\n                ctx.push()\r\n                response = self.full_dispatch_request()\r\n            except Exception as e:\r\n                error = e\r\n                response = self.handle_exception(e)\r\n            except:\r\n                error = sys.exc_info()[1]\r\n                raise\r\n>           return response(environ, start_response)\r\nE           TypeError: 'NoneType' object is not callable\r\n```"}}
{"actor":{"display_login":"bmjjr"}}