Esempio n. 1
0
 def test_lib_key_no_deprecated_support(self):
     lib_key = CourseKey.from_string('library-v1:TestX+lib1')
     with self.assertRaises(AttributeError):
         lib_key.to_deprecated_string()
     with self.assertRaises(NotImplementedError):
         lib_key._to_deprecated_string()  # pylint: disable=protected-access
     with self.assertRaises(NotImplementedError):
         LibraryLocator._from_deprecated_string('test/test/test')  # pylint: disable=protected-access
     with self.assertRaises(InvalidKeyError):
         LibraryLocator(org='org', library='code', deprecated=True)
Esempio n. 2
0
 def test_lib_key_no_deprecated_support(self):
     lib_key = CourseKey.from_string('library-v1:TestX+lib1')
     with self.assertRaises(AttributeError):
         lib_key.to_deprecated_string()
     with self.assertRaises(NotImplementedError):
         lib_key._to_deprecated_string()  # pylint: disable=protected-access
     with self.assertRaises(NotImplementedError):
         LibraryLocator._from_deprecated_string('test/test/test')  # pylint: disable=protected-access
     with self.assertRaises(InvalidKeyError):
         LibraryLocator(org='org', library='code', deprecated=True)