API - refacto + remove unused endpoint for now

This commit is contained in:
Sam
2022-03-19 20:34:36 +01:00
parent dfe50b5287
commit b5b4ac8f92
19 changed files with 499 additions and 577 deletions

View File

@ -30,6 +30,12 @@ def user_password_change_email_mock() -> Iterator[MagicMock]:
yield mock
@pytest.fixture()
def reset_password_email() -> Iterator[MagicMock]:
with patch('fittrackee.users.auth.reset_password_email') as mock:
yield mock
@pytest.fixture()
def user_reset_password_email() -> Iterator[MagicMock]:
with patch('fittrackee.users.users.reset_password_email') as mock:

View File

@ -60,7 +60,7 @@ def user_1_paris() -> User:
@pytest.fixture()
def user_2() -> User:
user = User(username='toto', email='toto@toto.com', password='87654321')
user = User(username='toto', email='toto@toto.com', password='12345678')
db.session.add(user)
db.session.commit()
return user
@ -68,7 +68,7 @@ def user_2() -> User:
@pytest.fixture()
def user_2_admin() -> User:
user = User(username='toto', email='toto@toto.com', password='87654321')
user = User(username='toto', email='toto@toto.com', password='12345678')
user.admin = True
db.session.add(user)
db.session.commit()