From 702b7feb34cfa7abee413921ea83770cb317697b Mon Sep 17 00:00:00 2001 From: toavina Date: Wed, 30 Oct 2024 11:54:12 +0300 Subject: [PATCH] Added one more test --- ckanext/zarr/tests/test_authentication.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ckanext/zarr/tests/test_authentication.py b/ckanext/zarr/tests/test_authentication.py index 360dea2..23ffa8f 100644 --- a/ckanext/zarr/tests/test_authentication.py +++ b/ckanext/zarr/tests/test_authentication.py @@ -52,6 +52,19 @@ def test_wrong_password(self): authenticated_user = ZaRRPlugin.authenticate(ZaRRPlugin(), identity) assert authenticated_user is None + def test_wrong_password_with_different_case_email(self): + """Test authentication fails with incorrect password and different case email""" + factories.User( + email='test@example.com', + password='correctpassword' + ) + identity = { + 'login': 'Test@Example.com', + 'password': 'wrongpassword' + } + authenticated_user = ZaRRPlugin.authenticate(ZaRRPlugin(), identity) + assert authenticated_user is None + def test_nonexistent_user(self): """Test authentication fails for non-existent user""" identity = {