From 3f6cf1bb15b01583cf78e316baa49c929a119bd1 Mon Sep 17 00:00:00 2001 From: Bernardc Paulus Date: Mon, 13 Nov 2017 11:56:06 +0100 Subject: [PATCH] docs: testing: expose init_db function on module --- docs/testing.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/testing.rst b/docs/testing.rst index a040b7ef..4d00981c 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -86,6 +86,11 @@ the :func:`os.close` function to close the file. To delete the database after the test, the fixture closes the file and removes it from the filesystem. +Finally, note our use of ``flaskr.init_db()``: this requires the ``init_db`` +function to be exposed on our ``flaskr`` module. Add it in the ``__init__.py`` file::: + + from .flaskr import app, init_db + If we now run the test suite, we should see the following output:: $ pytest