mealie/tests/unit_tests/test_exceptions.py
Hayden 7866f0f46e
Feature/improve localization (#1147)
* use locale to set language header

* rewrite i18n provider and drop dependency

* rename file

* rename CrudMixin to HttpRepo

* refactor: code-cleanup

* add crowdin source

* remove unused translations

* grab translations from dev branch

* add translation support for foods, units, and labels

* remove rich import
2022-04-10 14:07:35 -08:00

12 lines
430 B
Python

from mealie.core import exceptions
from mealie.lang import local_provider
def test_mealie_registered_exceptions() -> None:
provider = local_provider()
lookup = exceptions.mealie_registered_exceptions(provider)
assert "permission" in lookup[exceptions.PermissionDenied]
assert "The requested resource was not found" in lookup[exceptions.NoEntryFound]
assert "integrity" in lookup[exceptions.IntegrityError]