101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

501
active users

#learningbydoing

0 posts0 participants0 posts today
Replied in thread

I finally got testing working the way I wanted it and it turns out, it did not take a lot of lines of code.

in my pytest.ini file, I set an env var with the file path to the sqlite database.

When the app runs, it checks that same env var and will default to the filename production.db if the env var is not set.

If the database name is the non-prod one, it will drop all the tables when the app launches.

The end result is that my test database is empty every time I run pytest and data that should persist in production.db will be preserved between app runs.