@@ -24,9 +24,10 @@ def test_get_operation():
2424 client = operations_v1 .OperationsClient (channel )
2525 channel .GetOperation .response = operations_pb2 .Operation (name = "meep" )
2626
27- response = client .get_operation ("name" , metadata = [("x-goog-request-params " , "foo" )])
27+ response = client .get_operation ("name" , metadata = [("header " , "foo" )])
2828
29- assert ("x-goog-request-params" , "foo" ) in channel .GetOperation .calls [0 ].metadata
29+ assert ("header" , "foo" ) in channel .GetOperation .calls [0 ].metadata
30+ assert ("x-goog-request-params" , "name=name" ) in channel .GetOperation .calls [0 ].metadata
3031 assert len (channel .GetOperation .requests ) == 1
3132 assert channel .GetOperation .requests [0 ].name == "name"
3233 assert response == channel .GetOperation .response
@@ -42,12 +43,13 @@ def test_list_operations():
4243 list_response = operations_pb2 .ListOperationsResponse (operations = operations )
4344 channel .ListOperations .response = list_response
4445
45- response = client .list_operations ("name" , "filter" , metadata = [("x-goog-request-params " , "foo" )])
46+ response = client .list_operations ("name" , "filter" , metadata = [("header " , "foo" )])
4647
4748 assert isinstance (response , page_iterator .Iterator )
4849 assert list (response ) == operations
4950
50- assert ("x-goog-request-params" , "foo" ) in channel .ListOperations .calls [0 ].metadata
51+ assert ("header" , "foo" ) in channel .ListOperations .calls [0 ].metadata
52+ assert ("x-goog-request-params" , "name=name" ) in channel .ListOperations .calls [0 ].metadata
5153 assert len (channel .ListOperations .requests ) == 1
5254 request = channel .ListOperations .requests [0 ]
5355 assert isinstance (request , operations_pb2 .ListOperationsRequest )
@@ -60,9 +62,10 @@ def test_delete_operation():
6062 client = operations_v1 .OperationsClient (channel )
6163 channel .DeleteOperation .response = empty_pb2 .Empty ()
6264
63- client .delete_operation ("name" , metadata = [("x-goog-request-params " , "foo" )])
65+ client .delete_operation ("name" , metadata = [("header " , "foo" )])
6466
65- assert ("x-goog-request-params" , "foo" ) in channel .DeleteOperation .calls [0 ].metadata
67+ assert ("header" , "foo" ) in channel .DeleteOperation .calls [0 ].metadata
68+ assert ("x-goog-request-params" , "name=name" ) in channel .DeleteOperation .calls [0 ].metadata
6669 assert len (channel .DeleteOperation .requests ) == 1
6770 assert channel .DeleteOperation .requests [0 ].name == "name"
6871
@@ -72,8 +75,9 @@ def test_cancel_operation():
7275 client = operations_v1 .OperationsClient (channel )
7376 channel .CancelOperation .response = empty_pb2 .Empty ()
7477
75- client .cancel_operation ("name" , metadata = [("x-goog-request-params " , "foo" )])
78+ client .cancel_operation ("name" , metadata = [("header " , "foo" )])
7679
77- assert ("x-goog-request-params" , "foo" ) in channel .CancelOperation .calls [0 ].metadata
80+ assert ("header" , "foo" ) in channel .CancelOperation .calls [0 ].metadata
81+ assert ("x-goog-request-params" , "name=name" ) in channel .CancelOperation .calls [0 ].metadata
7882 assert len (channel .CancelOperation .requests ) == 1
7983 assert channel .CancelOperation .requests [0 ].name == "name"
0 commit comments