aboutsummaryrefslogblamecommitdiffstats
path: root/ctrack/organisations/tests/test_factories.py
blob: 0b793c33290fd9d722ad17e8a41a8414dfff69cb (plain) (tree)
1
2
3
4
5
6
7
8
9
10

             


                                                  
                                            
 
 

                                  












                                   
                                                                  
                       




                                                                          
import pytest

from ctrack.organisations.tests.factories import (
    OrganisationFactory,
    PersonFactory,
    RoleFactory, SingleDateTimeEventFactory,
)

pytestmark = pytest.mark.django_db


def test_organisation_factory():
    o = OrganisationFactory.build()
    assert o.name


def test_role_factory():
    r = RoleFactory.build()
    assert r.name


def test_person_factory():
    r = RoleFactory.build()
    p = PersonFactory.build(role=r, predecessor__predecessor=None)
    assert p.first_name


def test_meeting_event_factory():
    meeting = SingleDateTimeEventFactory.create(type_descriptor="MEETING")
    assert meeting.type_descriptor == "MEETING"