blob: 85fa2ebf8066c6647e8fc5250ca4f81b05c929a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# TODO Here we need to make use of the populate script to create a massive
# test fixture.
import pytest
from ctrack.core.utils import populate_db
from ctrack.organisations.tests.factories import (
OrganisationFactory,
PersonFactory,
RoleFactory,
)
@pytest.fixture
def role():
return RoleFactory.create(name="Test Role")
@pytest.fixture
def org_with_people(role):
org = OrganisationFactory.create(
submode=None,
name="TEST ORGANISATION",
designation_type=3,
registered_company_name="Test PLC",
comments="NA",
)
PersonFactory.create(
role=role,
job_title="Test Job Title",
predecessor=None,
organisation__submode=None,
organisation=org,
)
return org
|