def test_unicode(self): fault_error = FaultError() fault_error.Message = "test" fault_error.code = 100 fault_error.Detail = "detail" self.assertEquals(str(fault_error), "Code: 100 Message: test Detail: detail")
def test_set_object(self): obj = FaultError() batch_item = BatchItemRequest() batch_item.set_object(obj) self.assertEquals(batch_item._original_object, obj) self.assertEquals(batch_item.Error, obj)
def test__repr__(self): fault_error = FaultError() fault_error.Message = "test" fault_error.code = 100 fault_error.Detail = "detail" self.assertEqual(fault_error.__repr__(), "Code: 100 Message: test Detail: detail")
def test_unicode(self): fault_error = FaultError() fault_error.Message = "test" fault_error.code = 100 self.assertEquals(unicode(fault_error), "test (100)")