def simulate(protocol, headers=None): env = testing.create_environ( method='GET', scheme=protocol, path=_TEST_PATH, query_string='', headers=headers, ) srmock = testing.StartResponseMock() iterable = app(env, srmock) return testing.Result(iterable, srmock.status, srmock.headers)
def test_wsgi_iterable_not_closeable(self): result = testing.Result([], falcon.HTTP_200, []) assert not result.content assert result.json is None
def test_wsgi_iterable_not_closeable(self): result = testing.Result([], falcon.HTTP_200, []) self.assertFalse(result.content)