summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorD. Can Celasun <can@dcc.im>2019-12-10 22:13:06 +0000
committerD. Can Celasun <can@dcc.im>2019-12-10 22:13:06 +0000
commit1234ddf8a5c98d5d700c82e087f04725170ad581 (patch)
tree38cfceb980bf08948c575c4091b8e17fbbb47ab6 /test/py
parentb40f5c227f8db61be523f23ca017519167589d97 (diff)
downloadthrift-1234ddf8a5c98d5d700c82e087f04725170ad581.tar.gz
Revert "THRIFT-4002: Make generated exception classes immutable by default"
This reverts commit b40f5c227f8db61be523f23ca017519167589d97.
Diffstat (limited to 'test/py')
-rwxr-xr-xtest/py/TestFrozen.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/test/py/TestFrozen.py b/test/py/TestFrozen.py
index ce7425f88..6d2595cf2 100755
--- a/test/py/TestFrozen.py
+++ b/test/py/TestFrozen.py
@@ -19,9 +19,7 @@
# under the License.
#
-from DebugProtoTest import Srv
from DebugProtoTest.ttypes import CompactProtoTestStruct, Empty, Wrapper
-from DebugProtoTest.ttypes import ExceptionWithAMap, MutableException
from thrift.Thrift import TFrozenDict
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TCompactProtocol
@@ -96,21 +94,6 @@ class TestFrozenBase(unittest.TestCase):
x2 = self._roundtrip(x, Wrapper)
self.assertEqual(x2.foo, Empty())
- def test_frozen_exception(self):
- exc = ExceptionWithAMap(blah='foo')
- with self.assertRaises(TypeError):
- exc.blah = 'bar'
- mutexc = MutableException(msg='foo')
- mutexc.msg = 'bar'
- self.assertEqual(mutexc.msg, 'bar')
-
- def test_frozen_exception_serialization(self):
- result = Srv.declaredExceptionMethod_result(
- xwamap=ExceptionWithAMap(blah="error"))
- deserialized = self._roundtrip(
- result, Srv.declaredExceptionMethod_result())
- self.assertEqual(result, deserialized)
-
class TestFrozen(TestFrozenBase):
def protocol(self, trans):