diff --git a/login_provider/test/behave/mocks/db.py b/login_provider/test/behave/mocks/db.py
index 4904fe034e8ca1df95ed60cee8f71daaf8e307e5..896bf65cea801cba9bad435e2ffcd83bbba3511d 100644
--- a/login_provider/test/behave/mocks/db.py
+++ b/login_provider/test/behave/mocks/db.py
@@ -15,7 +15,7 @@ class User(UserMixin):
         self._load_remote_user_info()
 
     def _load_remote_user_info(self):
-        if self.username in users:
+        if self.username in USERS:
             self.active = USERS[self.username]["active"]
             self.email = USERS[self.username]["email"]