Update testing.rst
It now describes how to install flaskr using pip so that all tests pass.
This commit is contained in:
parent
db061cf736
commit
2ec150af02
1 changed files with 4 additions and 1 deletions
|
|
@ -29,6 +29,9 @@ First, we need an application to test; we will use the application from
|
||||||
the :ref:`tutorial`. If you don't have that application yet, get the
|
the :ref:`tutorial`. If you don't have that application yet, get the
|
||||||
source code from :gh:`the examples <examples/tutorial>`.
|
source code from :gh:`the examples <examples/tutorial>`.
|
||||||
|
|
||||||
|
So that we can import the module ``flaskr`` correctly, we need to run
|
||||||
|
``pip install -e .`` in the folder ``tutorial``.
|
||||||
|
|
||||||
The Testing Skeleton
|
The Testing Skeleton
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
|
@ -46,7 +49,7 @@ the application for testing and initializes a new database::
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from flaskr import flaskr
|
from flaskr import create_app
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue