forked from brightbeanxyz/brightbean-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
24 lines (17 loc) · 653 Bytes
/
Copy pathconftest.py
File metadata and controls
24 lines (17 loc) · 653 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 django.utils import timezone
from apps.accounts.models import User
from apps.members.models import OrgMembership
from apps.organizations.models import Organization
@pytest.fixture
def user(db):
return User.objects.create_user(
email="test@example.com", password="testpass123", name="Test User", tos_accepted_at=timezone.now()
)
@pytest.fixture
def organization(db):
return Organization.objects.create(name="Test Organization")
@pytest.fixture
def org_owner(db, user, organization):
OrgMembership.objects.create(user=user, organization=organization, org_role=OrgMembership.OrgRole.OWNER)
return user