-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconftest.py
More file actions
24 lines (17 loc) · 746 Bytes
/
conftest.py
File metadata and controls
24 lines (17 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import pytest
from tests.test_data import create_default_data
from people.models import User
# populate the test database with some basic data from test_data.json
@pytest.fixture(scope="session")
def django_db_setup(django_db_setup, django_db_blocker):
"""overriden db setup fixture that loads the test data"""
with django_db_blocker.unblock():
create_default_data()
@pytest.fixture(scope="function")
def mentee(client):
client.login(email="[email protected]", password="menteepassword")
return User.objects.get(email="[email protected]")
@pytest.fixture(scope="function")
def mentor(client):
client.login(email="[email protected]", password="mentorpassword")
return User.objects.get(email="[email protected]")