From ccd02bfe8c90ee8dbf30cc2be61a7d483ff24cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Afonso=20Queir=C3=B3s?= Date: Mon, 5 Sep 2016 16:57:00 +0200 Subject: [PATCH] Correcting Custom Test Client class docs (#2004) --- flask/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flask/app.py b/flask/app.py index 774d5234..bfc0efc2 100644 --- a/flask/app.py +++ b/flask/app.py @@ -878,9 +878,9 @@ class Flask(_PackageBoundObject): from flask.testing import FlaskClient class CustomClient(FlaskClient): - def __init__(self, authentication=None, *args, **kwargs): - FlaskClient.__init__(*args, **kwargs) - self._authentication = authentication + def __init__(self, *args, **kwargs): + self._authentication = kwargs.pop("authentication") + super(CustomClient,self).__init__( *args, **kwargs) app.test_client_class = CustomClient client = app.test_client(authentication='Basic ....')