@@ -24,9 +24,10 @@ def test_get_operation():
24
24
client = operations_v1 .OperationsClient (channel )
25
25
channel .GetOperation .response = operations_pb2 .Operation (name = "meep" )
26
26
27
- response = client .get_operation ("name" , metadata = [("x-goog-request-params " , "foo" )])
27
+ response = client .get_operation ("name" , metadata = [("header " , "foo" )])
28
28
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
30
31
assert len (channel .GetOperation .requests ) == 1
31
32
assert channel .GetOperation .requests [0 ].name == "name"
32
33
assert response == channel .GetOperation .response
@@ -42,12 +43,13 @@ def test_list_operations():
42
43
list_response = operations_pb2 .ListOperationsResponse (operations = operations )
43
44
channel .ListOperations .response = list_response
44
45
45
- response = client .list_operations ("name" , "filter" , metadata = [("x-goog-request-params " , "foo" )])
46
+ response = client .list_operations ("name" , "filter" , metadata = [("header " , "foo" )])
46
47
47
48
assert isinstance (response , page_iterator .Iterator )
48
49
assert list (response ) == operations
49
50
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
51
53
assert len (channel .ListOperations .requests ) == 1
52
54
request = channel .ListOperations .requests [0 ]
53
55
assert isinstance (request , operations_pb2 .ListOperationsRequest )
@@ -60,9 +62,10 @@ def test_delete_operation():
60
62
client = operations_v1 .OperationsClient (channel )
61
63
channel .DeleteOperation .response = empty_pb2 .Empty ()
62
64
63
- client .delete_operation ("name" , metadata = [("x-goog-request-params " , "foo" )])
65
+ client .delete_operation ("name" , metadata = [("header " , "foo" )])
64
66
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
66
69
assert len (channel .DeleteOperation .requests ) == 1
67
70
assert channel .DeleteOperation .requests [0 ].name == "name"
68
71
@@ -72,8 +75,9 @@ def test_cancel_operation():
72
75
client = operations_v1 .OperationsClient (channel )
73
76
channel .CancelOperation .response = empty_pb2 .Empty ()
74
77
75
- client .cancel_operation ("name" , metadata = [("x-goog-request-params " , "foo" )])
78
+ client .cancel_operation ("name" , metadata = [("header " , "foo" )])
76
79
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
78
82
assert len (channel .CancelOperation .requests ) == 1
79
83
assert channel .CancelOperation .requests [0 ].name == "name"
0 commit comments