'Tests that "visible_to_staff_only" overrides start date.'

@ddt.data((True, None, access_response.VisibilityError), (False, None), (True, YESTERDAY, access_response.VisibilityError), (False, YESTERDAY), (True, TOMORROW, access_response.VisibilityError), (False, TOMORROW, access_response.StartDateError))
@ddt.unpack
@patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False})
def test__has_access_descriptor_staff_lock(self, visible_to_staff_only, start, expected_error_type=None):

    expected_access = (expected_error_type is None)
    mock_unit = Mock(location=self.course.location, user_partitions=[])
    mock_unit._class_tags = {}
    mock_unit.visible_to_staff_only = visible_to_staff_only
    mock_unit.start = start
    mock_unit.merged_group_access = {}
    self.verify_access(mock_unit, expected_access, expected_error_type)
