def test_wizard_logged_in_user_no_questions(self, event, client, user):
submission_type = SubmissionType.objects.filter(event=event).first().pk
client.force_login(user)
response, current_url = self.perform_init_wizard(client)
response, current_url = self.perform_info_wizard(client, response, current_url, submission_type=submission_type, next='profile')
response, current_url = self.perform_profile_form(client, response, current_url)
doc = bs4.BeautifulSoup(response.rendered_content, "lxml")
assert doc.select('.alert-success')
assert doc.select('.user-row')
sub = Submission.objects.last()
assert sub.title == 'Submission title'
assert not sub.answers.exists()
s_user = sub.speakers.first()
assert s_user.pk == user.pk
assert s_user.nick == 'testuser'
assert s_user.name == 'Jane Doe'
assert s_user.profiles.get(event=event).biography == 'l337 hax0r'
assert len(djmail.outbox) == 1
评论列表
文章目录