コード例 #1
0
 def test_setDescriptionExceptionBadMap(self):
     attachment = Attachment(description=LanguageMap({"en-US": "test"}))
     with self.assertRaises(ValueError):
         attachment.description = ({"bad map"})
コード例 #2
0
 def test_setDescriptionExceptionBadMap(self):
     attachment = Attachment(description=LanguageMap({"en-US": "test"}))
     with self.assertRaises(ValueError):
         attachment.description = ({"bad map"})
コード例 #3
0
 def test_setDescriptionExceptionNestedObject(self):
     attachment = Attachment(description=LanguageMap({"en-US": "test"}))
     with self.assertRaises(TypeError):
         attachment.description = ({"fr-CA": {"nested": "object"}})
     self.languageMapVerificationHelper(attachment.description)
コード例 #4
0
 def test_setDescriptionExceptionNestedObject(self):
     attachment = Attachment(description=LanguageMap({"en-US": "test"}))
     with self.assertRaises(TypeError):
         attachment.description = ({"fr-CA": {"nested": "object"}})
     self.languageMapVerificationHelper(attachment.description)