Skip to content

Workflow question related to tests #19

@thomthom

Description

@thomthom

I have setup my app with:

  • flask-sqlalchemy-lite
  • flask-alembic

I have setup flask-alemic similar to: https://flask-sqlalchemy-lite.readthedocs.io/en/latest/alembic/

Then I'm trying to follow the testing article, but got stomped on the "Avoid Writing Data" section:
https://flask-sqlalchemy-lite.readthedocs.io/en/latest/testing/#avoid-writing-data

I created a separate test database for testing that is separate from my local dev.

However, using the app fixture from "Avoid Writing Data" will lead to errors when running my tests because there are no tables in the test database. So for that workflow I assume that one is suppose to migrate the test database manually. But how does that workflow work?

And I'm a little confused to use the setup from "Use a Test Database" (that creates and drops the database) vs "Avoid Writing Data"?

If this is not the place for such questions, can anyone suggest an alternative?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions