def test_should_dump_course( self, last_command_run, last_course_published, should_dump, mock_get_command_last_run, mock_get_course_last_published, ): """ Tests whether a course should be dumped given the last time it was dumped and the last time it was published. """ mock_get_command_last_run.return_value = last_command_run mock_get_course_last_published.return_value = last_course_published mock_course_key = mock.Mock() mock_graph = mock.Mock() assert should_dump_course(mock_course_key, mock_graph) == should_dump
def test_should_dump_course( self, last_command_run, last_course_published, should_dump, mock_get_command_last_run, mock_get_course_last_published, ): """ Tests whether a course should be dumped given the last time it was dumped and the last time it was published. """ mock_get_command_last_run.return_value = last_command_run mock_get_course_last_published.return_value = last_course_published mock_course_key = mock.Mock() mock_graph = mock.Mock() self.assertEqual( should_dump_course(mock_course_key, mock_graph), should_dump, )