def get_cookie_header(jar, request):
 r = MockRequest(request)
 jar.add_cookie_header(r)
 return r.get_new_headers().get('Cookie')

def get_cookie_header ( jar , request ) : r = MockRequest ( request ) jar . add_cookie_header ( r ) return r . get_new_headers ( ) . get ( 'Cookie' )
produce an appropriate cookie header string to be sent with request .