aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/src/grpc/_adapter/_links_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/src/grpc/_adapter/_links_test.py')
-rw-r--r--src/python/src/grpc/_adapter/_links_test.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/python/src/grpc/_adapter/_links_test.py b/src/python/src/grpc/_adapter/_links_test.py
index cfdcc2c4bc..4987be389a 100644
--- a/src/python/src/grpc/_adapter/_links_test.py
+++ b/src/python/src/grpc/_adapter/_links_test.py
@@ -43,6 +43,14 @@ _IDENTITY = lambda x: x
_TIMEOUT = 2
+# TODO(nathaniel): End-to-end metadata testing.
+def _transform_metadata(unused_metadata):
+ return (
+ ('one unused key', 'one unused value'),
+ ('another unused key', 'another unused value'),
+)
+
+
class RoundTripTest(unittest.TestCase):
def setUp(self):
@@ -76,7 +84,8 @@ class RoundTripTest(unittest.TestCase):
rear_link = rear.RearLink(
'localhost', port, self.rear_link_pool, {test_method: None},
- {test_method: None}, False, None, None, None)
+ {test_method: None}, False, None, None, None,
+ metadata_transformer=_transform_metadata)
rear_link.join_fore_link(test_fore_link)
test_fore_link.join_rear_link(rear_link)
rear_link.start()