示例#1
0
 def test_orphan_has_no_source(self):
     """Tests that a orphaned xblock has no staff lock source"""
     self.assertIsNone(utils.find_staff_lock_source(self.orphan))
示例#2
0
 def test_no_source_for_vertical(self):
     """Tests a vertical with no staff lock set anywhere"""
     self._update_staff_locks(False, False, False)
     self.assertIsNone(utils.find_staff_lock_source(self.vertical))
示例#3
0
 def _verify_staff_lock_source(self, item, expected_source):
     """Helper to verify that the staff lock source of a given item matches the expected source"""
     source = utils.find_staff_lock_source(item)
     self.assertEqual(source.location, expected_source.location)
     self.assertTrue(source.visible_to_staff_only)