테스트 요청시 쿠키를 보내는 데 문제가 있습니다.nosetests를 통해 Flask 응용 프로그램을 테스트 할 때 요청이있는 쿠키를 어떻게 보내나요?
# 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.cookies.get('user_hash') inside the app, which contains None
내가이 간단하지 생각,하지만 난 여기에 올바른 방법으로 쿠키를 구축하는 방법을 모른다 :이 같은 뭔가를 시도했습니다. 헤더의 쿠키를 전송할 수 있도록 두 번째 요청을 어떻게 작성해야합니까?
감사합니다.
정확히 내가 찾고있는 것이 었습니다. 감사. :) – vergenzt