Docs tweak

This commit is contained in:
Tom Christie 2019-02-18 18:31:19 +00:00
parent abf7f1ccf9
commit a28c0e70b1
1 changed files with 2 additions and 1 deletions

View File

@ -276,12 +276,13 @@ We can adjust the `create_test_database` fixture slightly:
```python
from alembic import command
from alembic.config import Config
import app
...
@pytest.fixture(scope="session", autouse=True)
def create_test_database():
url = str(app.database._url)
url = str(app.DATABASE_URL)
engine = create_engine(url)
assert not database_exists(url), 'Test database already exists. Aborting tests.'
create_database(url) # Create the test database.