'Verify on executing management command course overview data is updated
with course run data from course discovery.'

def test_course_run_sync(self, mock_catalog_course_runs):

    mock_catalog_course_runs.return_value = [self.catalog_course_run]
    earlier_marketing_url = self.get_course_overview_marketing_url(self.course.id)
    course_overview = CourseOverview.objects.get(id=self.course.id)
    earlier_eligible_for_financial_aid = course_overview.eligible_for_financial_aid
    call_command('sync_course_runs')
    course_overview.refresh_from_db()
    updated_marketing_url = self.get_course_overview_marketing_url(self.course.id)
    updated_eligible_for_financial_aid = course_overview.eligible_for_financial_aid
    self.assertNotEqual(earlier_marketing_url, updated_marketing_url)
    self.assertNotEqual(earlier_eligible_for_financial_aid, updated_eligible_for_financial_aid)
    self.assertEqual(updated_marketing_url, 'test_marketing_url')
    self.assertEqual(updated_eligible_for_financial_aid, False)
