Exemplo n.º 1
0
    def test_bad_task_id_on_update(self):
        task_entry = self._create_input_entry()

        def dummy_update_subtask_status(entry_id, _current_task_id, new_subtask_status):
            """Passes a bad value for task_id to test update_subtask_status"""
            bogus_task_id = "this-is-bogus"
            update_subtask_status(entry_id, bogus_task_id, new_subtask_status)

        with self.assertRaises(ValueError):
            with patch('bulk_email.tasks.update_subtask_status', dummy_update_subtask_status):
                send_bulk_course_email(task_entry.id, {})
Exemplo n.º 2
0
    def test_bad_task_id_on_update(self):
        task_entry = self._create_input_entry()

        def dummy_update_subtask_status(entry_id, _current_task_id, new_subtask_status):
            """Passes a bad value for task_id to test update_subtask_status"""
            bogus_task_id = "this-is-bogus"
            update_subtask_status(entry_id, bogus_task_id, new_subtask_status)

        with self.assertRaises(ValueError):
            with patch('bulk_email.tasks.update_subtask_status', dummy_update_subtask_status):
                send_bulk_course_email(task_entry.id, {})
Exemplo n.º 3
0
 def test_email_missing_current_task(self):
     task_entry = self._create_input_entry()
     with pytest.raises(ValueError):
         send_bulk_course_email(task_entry.id, {})
Exemplo n.º 4
0
 def test_email_missing_current_task(self):
     task_entry = self._create_input_entry()
     with self.assertRaises(ValueError):
         send_bulk_course_email(task_entry.id, {})