def test_remove_sections_from_cm_assert_exception_works(self, get_mock, remove_users_mock, logger_mock):
     """
     test that logger is called after ObjectDoesNotExist is thrown
     """
     get_mock.side_effect = ObjectDoesNotExist
     remove_sections_from_cm([ANY], ANY)
     logger_mock.info.assert_called_once_with(
         'section with canvas_section_id <ANY> does not exist')
 def test_remove_sections_from_cm_assert_remove_users_called(self, get_mock, remove_users_mock, logger_mock):
     """
     test that remove_section_from_cm is called with the correct section_id
     """
     section = Mock(name="section")
     section.section_id = 1234
     get_mock.return_value = section
     remove_sections_from_cm([ANY], ANY)
     remove_users_mock.assert_called_once_with(1234)