'Tests that descriptor has access in preview mode.'

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

    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, True)
