diff options
Diffstat (limited to 'src/python/grpcio_tests/tests/unit/_rpc_test.py')
-rw-r--r-- | src/python/grpcio_tests/tests/unit/_rpc_test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/python/grpcio_tests/tests/unit/_rpc_test.py b/src/python/grpcio_tests/tests/unit/_rpc_test.py index 54f01d9f8d..34e7831a98 100644 --- a/src/python/grpcio_tests/tests/unit/_rpc_test.py +++ b/src/python/grpcio_tests/tests/unit/_rpc_test.py @@ -225,6 +225,7 @@ class RPCTest(unittest.TestCase): self.assertEqual(expected_response, response) self.assertIs(grpc.StatusCode.OK, call.code()) + self.assertEqual("", call.debug_error_string()) def testSuccessfulUnaryRequestFutureUnaryResponse(self): request = b'\x07\x08' @@ -706,6 +707,13 @@ class RPCTest(unittest.TestCase): self.assertIs(grpc.StatusCode.UNKNOWN, exception_context.exception.code()) + # sanity checks on to make sure returned string contains default members + # of the error + debug_error_string = exception_context.exception.debug_error_string() + self.assertIn("created", debug_error_string) + self.assertIn("description", debug_error_string) + self.assertIn("file", debug_error_string) + self.assertIn("file_line", debug_error_string) def testFailedUnaryRequestFutureUnaryResponse(self): request = b'\x37\x17' |