'Tests that descriptor has no access when start date in future & without preview.'

@ddt.data((TOMORROW, access_response.StartDateError), (None, None), (YESTERDAY, None))
@ddt.unpack
@patch.dict('django.conf.settings.FEATURES', {'DISABLE_START_DATES': False})
@patch('courseware.access_utils.get_current_request_hostname', Mock(return_value='localhost'))
def test__has_access_descriptor_when_not_in_preview_mode(self, start, expected_error_type):

    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 = False
    mock_unit.start = start
    mock_unit.merged_group_access = {}
    self.verify_access(mock_unit, expected_access, expected_error_type)
