def METHOD_NAME(self):
    """
    Confirm course state when there is a future course run open for enrollment.
    """
    course = CourseFactory()
    course_run = self.create_run_future_open(course)
    with self.assertNumQueries(3):
        state = course.state
    expected_state = CourseState(1, course_run.start)
    self.assertEqual(state, expected_state)
    # Adding course runs of lower priority states should not change the result and require
    # only 1 additional database query
    self.create_run_ongoing_closed(course)
    self.create_run_future_closed(course)
    with self.assertNumQueries(1):
        state = course.state
    self.assertEqual(state, expected_state)