'Helper method that checks that is_xblock_visible_to_students returns the correct value both
with and without visible_to_staff_only set.'

def _test_visible_to_students(self, expected_visible_without_lock, name, start_date, publish=False):

    no_staff_lock = self._create_xblock_with_start_date(name, start_date, publish, visible_to_staff_only=False)
    self.assertEqual(expected_visible_without_lock, utils.is_currently_visible_to_students(no_staff_lock))
    staff_lock = self._create_xblock_with_start_date((name + '_locked'), start_date, publish, visible_to_staff_only=True)
    self.assertFalse(utils.is_currently_visible_to_students(staff_lock))
