Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ietf/meeting/tests_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,26 +590,26 @@ def test_sessions_post_save_creates_meetecho_conferences(self, mock_create_metho
mock_form.changed_data = []
mock_form.requires_approval = True

mock_form.cleaned_data = {'remote_participation': None}
mock_form.cleaned_data = {'date': date_today(), 'time': datetime.time(1, 23), 'remote_participation': None}
sessions_post_save(RequestFactory().post('/some/url'), [mock_form])
self.assertTrue(mock_create_method.called)
self.assertCountEqual(mock_create_method.call_args[0][0], [])

mock_create_method.reset_mock()
mock_form.cleaned_data = {'remote_participation': 'manual'}
mock_form.cleaned_data['remote_participation'] = 'manual'
sessions_post_save(RequestFactory().post('/some/url'), [mock_form])
self.assertTrue(mock_create_method.called)
self.assertCountEqual(mock_create_method.call_args[0][0], [])

mock_create_method.reset_mock()
mock_form.cleaned_data = {'remote_participation': 'meetecho'}
mock_form.cleaned_data['remote_participation'] = 'meetecho'
sessions_post_save(RequestFactory().post('/some/url'), [mock_form])
self.assertTrue(mock_create_method.called)
self.assertCountEqual(mock_create_method.call_args[0][0], [session])

# Check that an exception does not percolate through sessions_post_save
mock_create_method.side_effect = RuntimeError('some error')
mock_form.cleaned_data = {'remote_participation': 'meetecho'}
mock_form.cleaned_data['remote_participation'] = 'meetecho'
# create mock request with session / message storage
request = RequestFactory().post('/some/url')
setattr(request, 'session', 'session')
Expand Down