API - refacto + remove unused endpoint for now
This commit is contained in:
6
fittrackee/tests/fixtures/fixtures_emails.py
vendored
6
fittrackee/tests/fixtures/fixtures_emails.py
vendored
@ -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:
|
||||
|
4
fittrackee/tests/fixtures/fixtures_users.py
vendored
4
fittrackee/tests/fixtures/fixtures_users.py
vendored
@ -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()
|
||||
|
Reference in New Issue
Block a user