feat: add checkedin to api_new_meeting_registration() (#4424)

This commit is contained in:
Ryan Cross 2022-09-09 06:56:13 -07:00 committed by GitHub
parent 155b3a1e31
commit ad08ccad27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -356,6 +356,7 @@ class CustomApiTests(TestCase):
'meeting': meeting.number,
'reg_type': 'hackathon',
'ticket_type': '',
'checkedin': 'False',
}
url = urlreverse('ietf.api.views.api_new_meeting_registration')
r = self.client.post(url, reg)
@ -381,7 +382,7 @@ class CustomApiTests(TestCase):
#
# Check record
obj = MeetingRegistration.objects.get(email=reg['email'], meeting__number=reg['meeting'])
for key in ['affiliation', 'country_code', 'first_name', 'last_name', 'person', 'reg_type', 'ticket_type']:
for key in ['affiliation', 'country_code', 'first_name', 'last_name', 'person', 'reg_type', 'ticket_type', 'checkedin']:
self.assertEqual(getattr(obj, key), reg.get(key), "Bad data for field '%s'" % key)
#
# Test with existing user

View file

@ -135,7 +135,7 @@ def api_new_meeting_registration(request):
def err(code, text):
return HttpResponse(text, status=code, content_type='text/plain')
required_fields = [ 'meeting', 'first_name', 'last_name', 'affiliation', 'country_code',
'email', 'reg_type', 'ticket_type', ]
'email', 'reg_type', 'ticket_type', 'checkedin']
fields = required_fields + []
if request.method == 'POST':
# parameters: