How do I send cookies with request when testing Flask applications through nosetests?
问题 I'm having some trouble sending a cookie with my test request. I've tried something like this: # First request to log in, retrieve cookie from response response = self.app_client.post('/users/login', query_string={ data.. ) cookie = response.headers['Set-Cookie'] # Contains: user_hash=3f305370487731289a7f9bd8d379a1c2; Domain=.flowdev.com; Path=/ # Second request that requires the cookie response = self.app_client.get('/users/', headers={'Set-Cookie': cookie}) # Here i print out request