datatracker/ietf/stats/factories.py
Robert Sparks 97d21800d0
feat: include checkins at the registration desk in nomcom eligibility calculations (#4519)
* chore: rename utility functions to reflect rfc guiding them

* feat: include new checkedin flag in nomcom calculations

* fix: reflect history a bit more accurately.

* fix: address review comment on readability

* fix: finish what c44000d started
2022-10-07 16:17:28 -05:00

19 lines
631 B
Python

# Copyright The IETF Trust 2021, All Rights Reserved
import factory
from ietf.stats.models import MeetingRegistration
from ietf.meeting.factories import MeetingFactory
from ietf.person.factories import PersonFactory
class MeetingRegistrationFactory(factory.django.DjangoModelFactory):
class Meta:
model = MeetingRegistration
meeting = factory.SubFactory(MeetingFactory)
person = factory.SubFactory(PersonFactory)
reg_type = 'onsite'
first_name = factory.LazyAttribute(lambda obj: obj.person.first_name())
last_name = factory.LazyAttribute(lambda obj: obj.person.last_name())
attended = True