@@ -97,7 +97,7 @@ def test_cluster_application_state(self, request_mock):
97
97
98
98
def test_cluster_application_kill (self , request_mock ):
99
99
self .rm .cluster_application_kill ('app_1' )
100
- request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/state' , 'PUT' , data = {
100
+ request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/state' , 'PUT' , json = {
101
101
"state" : 'KILLED'
102
102
})
103
103
@@ -119,7 +119,7 @@ def test_cluster_node(self, request_mock):
119
119
120
120
def test_cluster_submit_application (self , request_mock ):
121
121
self .rm .cluster_submit_application ({"application-name" : "dummy_application" })
122
- request_mock .assert_called_with ('/ws/v1/cluster/apps' , 'POST' , data = {
122
+ request_mock .assert_called_with ('/ws/v1/cluster/apps' , 'POST' , json = {
123
123
"application-name" : "dummy_application"
124
124
})
125
125
@@ -133,7 +133,7 @@ def test_cluster_get_application_queue(self, request_mock):
133
133
134
134
def test_cluster_change_application_queue (self , request_mock ):
135
135
self .rm .cluster_change_application_queue ('app_1' , 'queue_1' )
136
- request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/queue' , 'PUT' , data = {
136
+ request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/queue' , 'PUT' , json = {
137
137
"queue" : 'queue_1'
138
138
})
139
139
@@ -143,7 +143,7 @@ def test_cluster_get_application_priority(self, request_mock):
143
143
144
144
def test_cluster_change_application_priority (self , request_mock ):
145
145
self .rm .cluster_change_application_priority ('app_1' , 'priority_1' )
146
- request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/priority' , 'PUT' , data = {
146
+ request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/priority' , 'PUT' , json = {
147
147
"priority" : 'priority_1'
148
148
})
149
149
@@ -260,7 +260,7 @@ def test_cluster_reservations(self, request_mock):
260
260
261
261
def test_cluster_new_delegation_token (self , request_mock ):
262
262
self .rm .cluster_new_delegation_token ('renewer_1' )
263
- request_mock .assert_called_with ('/ws/v1/cluster/delegation-token' , 'POST' , data = {
263
+ request_mock .assert_called_with ('/ws/v1/cluster/delegation-token' , 'POST' , json = {
264
264
"renewer" : "renewer_1"
265
265
})
266
266
@@ -282,21 +282,21 @@ def test_cluster_new_reservation(self, request_mock):
282
282
283
283
def test_cluster_submit_reservation (self , request_mock ):
284
284
self .rm .cluster_submit_reservation ({'reservation-id' : 'reservation_1' })
285
- request_mock .assert_called_with ('/ws/v1/cluster/reservation/submit' , 'POST' , data = {
285
+ request_mock .assert_called_with ('/ws/v1/cluster/reservation/submit' , 'POST' , json = {
286
286
'reservation-id' : 'reservation_1'
287
287
})
288
288
289
289
def test_cluster_update_reservation (self , request_mock ):
290
290
self .rm .cluster_update_reservation ({
291
291
'reservation-id' : 'reservation_1'
292
292
})
293
- request_mock .assert_called_with ('/ws/v1/cluster/reservation/update' , 'POST' , data = {
293
+ request_mock .assert_called_with ('/ws/v1/cluster/reservation/update' , 'POST' , json = {
294
294
'reservation-id' : 'reservation_1'
295
295
})
296
296
297
297
def test_cluster_delete_reservation (self , request_mock ):
298
298
self .rm .cluster_delete_reservation ('reservation_1' )
299
- request_mock .assert_called_with ('/ws/v1/cluster/reservation/delete' , 'POST' , data = {
299
+ request_mock .assert_called_with ('/ws/v1/cluster/reservation/delete' , 'POST' , json = {
300
300
'reservation-id' : 'reservation_1'
301
301
})
302
302
@@ -310,7 +310,7 @@ def test_cluster_application_timeout(self, request_mock):
310
310
311
311
def test_cluster_update_application_timeout (self , request_mock ):
312
312
self .rm .cluster_update_application_timeout ('app_1' , 'LIFETIME' , '2016-12-05T22:51:00.104+0530' )
313
- request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/timeout' , 'PUT' , data = {
313
+ request_mock .assert_called_with ('/ws/v1/cluster/apps/app_1/timeout' , 'PUT' , json = {
314
314
'timeout' : {'type' : 'LIFETIME' , 'expiryTime' : '2016-12-05T22:51:00.104+0530' }
315
315
})
316
316
@@ -325,7 +325,7 @@ def test_cluster_modify_scheduler_conf_mutation(self, request_mock):
325
325
'test' : 'test'
326
326
}
327
327
})
328
- request_mock .assert_called_with ('/ws/v1/cluster/scheduler-conf' , 'PUT' , data = {
328
+ request_mock .assert_called_with ('/ws/v1/cluster/scheduler-conf' , 'PUT' , json = {
329
329
'queue-name' : 'queue_1' ,
330
330
'params' : {
331
331
'test' : 'test'
0 commit comments