@@ -24,9 +24,10 @@ def test_get_operation():
2424client = operations_v1 .OperationsClient (channel )
2525channel .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
3031assert len (channel .GetOperation .requests )== 1
3132assert channel .GetOperation .requests [0 ].name == "name"
3233assert response == channel .GetOperation .response
@@ -42,12 +43,13 @@ def test_list_operations():
4243list_response = operations_pb2 .ListOperationsResponse (operations = operations )
4344channel .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
4748assert isinstance (response ,page_iterator .Iterator )
4849assert 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
5153assert len (channel .ListOperations .requests )== 1
5254request = channel .ListOperations .requests [0 ]
5355assert isinstance (request ,operations_pb2 .ListOperationsRequest )
@@ -60,9 +62,10 @@ def test_delete_operation():
6062client = operations_v1 .OperationsClient (channel )
6163channel .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
6669assert len (channel .DeleteOperation .requests )== 1
6770assert channel .DeleteOperation .requests [0 ].name == "name"
6871
@@ -72,8 +75,9 @@ def test_cancel_operation():
7275client = operations_v1 .OperationsClient (channel )
7376channel .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
7882assert len (channel .CancelOperation .requests )== 1
7983assert channel .CancelOperation .requests [0 ].name == "name"