-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add simple settings read from .env test
- Loading branch information
1 parent
620fa99
commit 7fad687
Showing
2 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Test that settings are loaded correctly""" | ||
|
||
from src.settings import Settings | ||
|
||
|
||
def test_config(): | ||
settings = Settings(_env_file='.env.example') | ||
"""Test that settings are loaded correctly""" | ||
assert settings.MOUNT_FOLDER == "/tmp/pdf_dir" | ||
assert settings.MAX_FILE_SIZE_MB == 123 | ||
assert settings.ENVIRONMENT == "local" | ||
assert settings.LANGUAGES == "mul,eng,nob" | ||
assert settings.REGISTRY_FILE == "" | ||
assert settings.REGISTRY_HOST == "" | ||
assert settings.REGISTRY_USER == "" | ||
assert settings.REGISTRY_DATABASE == "" | ||
assert settings.REGISTRY_PASSWORD == "" | ||
assert settings.USE_GIELLADETECT is False | ||
assert settings.GIELLADETECT_LANGS == "" | ||
assert settings.CUSTOM_PATH == "" |