mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-07 19:05:35 -05:00
fix: group creation (#1126)
* fix: unify group creation - closes #1100 * tests: disable password hashing during testing * tests: fix email config tests
This commit is contained in:
22
tests/unit_tests/core/test_security.py
Normal file
22
tests/unit_tests/core/test_security.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from pytest import MonkeyPatch
|
||||
|
||||
from mealie.core.config import get_app_settings
|
||||
from mealie.core.security.hasher import FakeHasher, PasslibHasher, get_hasher
|
||||
|
||||
|
||||
def test_get_hasher(monkeypatch: MonkeyPatch):
|
||||
hasher = get_hasher()
|
||||
|
||||
assert isinstance(hasher, FakeHasher)
|
||||
|
||||
monkeypatch.setenv("TESTING", "0")
|
||||
|
||||
get_hasher.cache_clear()
|
||||
get_app_settings.cache_clear()
|
||||
|
||||
hasher = get_hasher()
|
||||
|
||||
assert isinstance(hasher, PasslibHasher)
|
||||
|
||||
get_app_settings.cache_clear()
|
||||
get_hasher.cache_clear()
|
||||
Reference in New Issue
Block a user