Skip to content

Commit 3d4487d

Browse files
committed
Changed assertion for set network connection test
1 parent 95e4550 commit 3d4487d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/unit/webdriver/device/network_test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from test.unit.helper.test_helper import appium_command, android_w3c_driver
1717

1818
import httpretty
19+
import json
1920

2021

2122
class TestWebDriverNetwork(object):
@@ -36,9 +37,12 @@ def test_set_network_connection(self):
3637
httpretty.register_uri(
3738
httpretty.POST,
3839
appium_command('/session/1234567890/network_connection'),
39-
body='{"value": 2}'
40+
body='{"value": ""}'
4041
)
41-
assert driver.set_network_connection(2) == 2
42+
driver.set_network_connection(2)
43+
44+
d = json.loads(httpretty.last_request().body.decode('utf-8'))
45+
assert d['parameters']['type'] == 2
4246

4347
@httpretty.activate
4448
def test_toggle_wifi(self):

0 commit comments

Comments
 (0)