Module Import alias Import alias Import alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameStore body Expr Yield NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad decorator_list AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Lambda arguments args NameParam NameParam defaults Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num While CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Num TryExcept body Expr Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Num handlers ExceptHandler body AugAssignSub NameStore Num decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str If CompareIn NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Num Return Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad Str Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr Assign NameStore BoolOpOr SubscriptLoad AttributeLoad NameLoad attr Index Str Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list Call AttributeLoad NameLoad attr keyword Str FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr keyword ListLoad Str Str FunctionDef arguments args NameParam defaults body Return ListLoad TupleLoad Str NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return Call NameLoad Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args defaults body Return Call NameLoad Str decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr keyword ListLoad Str Str
N/A N/A time N/A multiprocessing N/A pytest N/A socket N/A N/A urllib2 urlopen N/A N/A N/A ImportError N/A urllib.request urlopen flask _request_ctx_stack client N/A N/A app N/A N/A N/A A Flask test client. An instance of :class:`flask.testing.TestClient`
    by default.
     N/A N/A N/A app test_client client N/A N/A N/A client N/A N/A pytest yield_fixture client_class N/A N/A request client N/A N/A N/A Uses to set a ``client`` class attribute to current Flask test client::

        @pytest.mark.usefixtures('client_class')
        class TestView:

            def login(self, email, password):
                credentials = {'email': email, 'password': password}
                return self.client.post(url_for('login'), data=credentials)

            def test_login(self):
                assert self.login('vital@example.com', 'pass').status_code == 200

     N/A N/A N/A request cls None N/A N/A N/A N/A request cls client client N/A N/A pytest fixture LiveServer N/A object N/A N/A The helper class uses to manage live server. Handles creation and
    stopping application in a separate process.

    :param app: The application to run.
    :param port: The port to run application.
     __init__ N/A N/A self app port N/A N/A N/A N/A self app app N/A N/A self port port N/A N/A self _process None N/A start N/A N/A self N/A N/A N/A Start application in a separate process. N/A worker N/A N/A N/A app port N/A N/A N/A app run port port use_reloader False N/A N/A self _process N/A N/A multiprocessing Process target worker args N/A N/A self app N/A self port N/A N/A N/A N/A self _process start N/A timeout 5 N/A N/A timeout 0 N/A N/A N/A N/A time sleep 1 N/A N/A N/A N/A urlopen N/A N/A self url N/A timeout 0 N/A N/A N/A N/A timeout 1 N/A url N/A N/A self url N/A N/A N/A Returns the complete url based on server options. N/A N/A http://localhost:%d%s N/A N/A self port url N/A stop N/A N/A self N/A N/A N/A Stop application process. N/A N/A self _process N/A N/A N/A N/A N/A self _process terminate N/A __repr__ N/A N/A self N/A N/A N/A N/A <LiveServer listening at %s> N/A N/A self url N/A N/A _rewrite_server_name N/A N/A server_name new_port N/A N/A N/A Rewrite server port in ``server_name`` with ``new_port`` value. N/A sep : N/A N/A sep server_name N/A N/A N/A server_name port N/A N/A server_name split sep 1 N/A N/A N/A sep join N/A server_name new_port N/A live_server N/A N/A request app monkeypatch N/A N/A N/A Run application in a separate process.

    When the ``live_server`` fixture is applyed, the ``url_for`` function
    works as expected::

        def test_server_is_up_and_running(live_server):
            index_url = url_for('index', _external=True)
            assert index_url == 'http://localhost:5000/'

            res = urllib2.urlopen(index_url)
            assert res.code == 200

     N/A s N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A s bind N/A 0 N/A port N/A N/A N/A s getsockname N/A 1 N/A N/A N/A s close N/A server_name N/A N/A N/A app config N/A SERVER_NAME localhost N/A N/A N/A monkeypatch setitem N/A app config SERVER_NAME N/A _rewrite_server_name server_name N/A str port N/A server N/A LiveServer app port N/A N/A N/A N/A request config getvalue start_live_server N/A N/A N/A N/A server start N/A N/A N/A request addfinalizer N/A server stop N/A server N/A N/A N/A pytest fixture scope function config N/A N/A app N/A N/A N/A An application config. N/A N/A app config N/A N/A pytest fixture request_ctx N/A N/A app N/A N/A N/A The request context which contains all request relevant information,
    e.g. `session`, `g`, `flashes`, etc.
     N/A N/A _request_ctx_stack top N/A N/A pytest fixture mimetype N/A N/A request N/A N/A N/A N/A request param N/A N/A N/A pytest fixture params N/A application/json text/html accept_mimetype N/A N/A mimetype N/A N/A N/A N/A N/A Accept mimetype N/A N/A pytest fixture accept_json N/A N/A request N/A N/A N/A N/A accept_mimetype application/json N/A N/A pytest fixture accept_jsonp N/A N/A N/A N/A N/A N/A accept_mimetype application/json-p N/A N/A pytest fixture accept_any N/A N/A request N/A N/A N/A N/A accept_mimetype N/A request param N/A N/A N/A pytest fixture params N/A * */*