Skip to content
Snippets Groups Projects
Verified Commit 269f9819 authored by Mark's avatar Mark
Browse files

Refactor const var name

parent 1af20525
No related branches found
No related tags found
1 merge request!3Change login provider backend to graphql
......@@ -5,7 +5,7 @@ USERNAME = environ["TESTUSER_USERNAME"]
PASSWORD = environ["TESTUSER_PASSWORD"]
EMAIL = environ["TESTUSER_EMAIL"]
users = {USERNAME: {"password": PASSWORD, "email": EMAIL, "active": True}}
USERS = {USERNAME: {"password": PASSWORD, "email": EMAIL, "active": True}}
class User(UserMixin):
def __init__(self, username):
......@@ -20,7 +20,7 @@ class User(UserMixin):
self.email = users[self.username]["email"]
def _verify_password(self, password):
return users[self.username]["password"] == password
return USERS[self.username]["password"] == password
def authenticate(self, password):
return self.active and self._verify_password(password)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment