|
| 1 | +import pytest |
| 2 | + |
| 3 | +from schemas import post |
| 4 | +from schemas import user |
| 5 | +from schemas import vote |
| 6 | +from db.orm import models |
| 7 | + |
| 8 | +@pytest.fixture |
| 9 | +def fake_emails_dict() -> list[dict[str, str]]: |
| 10 | + return [ |
| 11 | + {'email': 'testuser@gmail.com',}, |
| 12 | + {'email': 'cat@gmail.com',}, |
| 13 | + {'email': 'dog@gmail.com',}, |
| 14 | + ] |
| 15 | + |
| 16 | +@pytest.fixture |
| 17 | +def fake_usernames_dict() -> list[dict[str, str]]: |
| 18 | + return [ |
| 19 | + {'username': 'testuser@gmail.com',}, |
| 20 | + {'username': 'cat@gmail.com',}, |
| 21 | + {'username': 'dog@gmail.com',}, |
| 22 | + ] |
| 23 | + |
| 24 | +@pytest.fixture |
| 25 | +def fake_passwords_dict() -> list[dict[str, str]]: |
| 26 | + return [ |
| 27 | + {'password': 'password',}, |
| 28 | + {'password': 'meow',}, |
| 29 | + {'password': 'wof',}, |
| 30 | + ] |
| 31 | + |
| 32 | +@pytest.fixture |
| 33 | +def fake_users_creation_dict( |
| 34 | + fake_emails_dict, |
| 35 | + fake_passwords_dict |
| 36 | +) -> list[dict[str, str]]: |
| 37 | + return [email | password for email, password in zip(fake_emails_dict, fake_passwords_dict)] |
| 38 | + |
| 39 | +@pytest.fixture |
| 40 | +def fake_users_login_dict( |
| 41 | + fake_usernames_dict, |
| 42 | + fake_passwords_dict |
| 43 | +) -> list[dict[str, str]]: |
| 44 | + return [email | password for email, password in zip(fake_usernames_dict, fake_passwords_dict)] |
0 commit comments