Logo
Explore Help
Sign In
Mirrors/mealie
1
0
Fork 0
You've already forked mealie
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-10-28 00:34:47 -04:00
Code Issues Packages Projects Releases Wiki Activity
Files
b542583303def0108cf7152b2f4cc595cd7c9491
mealie/tests/pre_test.py

9 lines
296 B
Python
Raw Normal View History

feature/additional-db (#371) * add support for setting db_url * fix tests * add db_username/password env variables * init db if super user doesn't exist * fix tests * fix tests * set SQLite default DB_URL * don't run tests on draft PRs * add lint/black tests * add test-all * spell check settings * black/flake8 * check format fail * new badges * rename workflow * fix formatting * remove white-space * test connection arguments for pg * format * add new values to template * format * remove old script * monkeypatch test db * working docker-compose for postgres * update docs * test pg workflow * format * add driver * install w/ poetry * setup container * change image * set database to localhost * update tests * set url * fix url path * disable cache * database init * bust cache * get by name Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-01 13:35:57 -08:00
from mealie.core.config import determine_sqlite_path, settings
DB_URL = determine_sqlite_path(path=True, suffix="test")
DB_URL.unlink(missing_ok=True)
if settings.DB_ENGINE != "postgres":
# Monkeypatch Database Testing
settings.DB_URL = determine_sqlite_path(path=False, suffix="test")
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.7 Page: 25ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API