예제 #1
0
 def test_init(self):
     obj = nonza.SMFailed(
         condition=(namespaces.stanzas, "item-not-found")
     )
     self.assertEqual(
         (namespaces.stanzas, "item-not-found"),
         obj.condition
     )
예제 #2
0
 def test_default_init(self):
     obj = nonza.SMFailed()
     self.assertEqual((namespaces.stanzas, "undefined-condition"),
                      obj.condition)
예제 #3
0
 def test_init(self):
     obj = nonza.SMFailed(condition=errors.ErrorCondition.ITEM_NOT_FOUND)
     self.assertEqual(errors.ErrorCondition.ITEM_NOT_FOUND,
                      obj.condition.enum_member)
예제 #4
0
 def test_default_init(self):
     obj = nonza.SMFailed()
     self.assertEqual(errors.ErrorCondition.UNDEFINED_CONDITION,
                      obj.condition.enum_member)