From fed6fd32d80458219c7d167d529c0a2681858587 Mon Sep 17 00:00:00 2001 From: Matt Wright Date: Mon, 3 Mar 2014 14:14:54 -0500 Subject: [PATCH] Pass keyword args from `test_client` method to client class constructor --- flask/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask/app.py b/flask/app.py index 2840f426..3d6e2d72 100644 --- a/flask/app.py +++ b/flask/app.py @@ -821,7 +821,7 @@ class Flask(_PackageBoundObject): # without reloader and that stuff from an interactive shell. self._got_first_request = False - def test_client(self, use_cookies=True): + def test_client(self, use_cookies=True, **kwargs): """Creates a test client for this application. For information about unit testing head over to :ref:`testing`. @@ -857,7 +857,7 @@ class Flask(_PackageBoundObject): cls = self.test_client_class if cls is None: from flask.testing import FlaskClient as cls - return cls(self, self.response_class, use_cookies=use_cookies) + return cls(self, self.response_class, use_cookies=use_cookies, **kwargs) def open_session(self, request): """Creates or opens a new session. Default implementation stores all