Permalink
Browse files

fix unittest for use ConnectionType object, https://github.com/appium…

  • Loading branch information...
1 parent 674a476 commit 6fb1f7b339253b9c107573d2e83bd2cf2a36f85d @jollychang jollychang committed Oct 21, 2015
Showing with 3 additions and 4 deletions.
  1. +1 −2 src/AppiumLibrary/keywords/_android_utils.py
  2. +2 −2 tests/keywords/test_androidUtils.py
@@ -28,8 +28,7 @@ def set_network_connection_status(self, connectionStatus):
6 |(All network on) | 1 | 1 | 0
"""
driver = self._current_application()
- connType = ConnectionType(int(connectionStatus))
- return driver.set_network_connection(connType)
+ return driver.set_network_connection(int(connectionStatus))
def pull_file(self, path, decode=False):
"""Retrieves the file at `path` and return it's content.
@@ -7,7 +7,7 @@
from AppiumLibrary.keywords import _ApplicationManagementKeywords
from webdriverremotemock import WebdriverRemoteMock
from AppiumLibrary.keywords import _AndroidUtilsKeywords
-
+from appium.webdriver.connectiontype import ConnectionType
logger = logging.getLogger()
stream_handler = logging.StreamHandler(sys.stdout)
@@ -34,7 +34,7 @@ def setUp(self):
self.au._current_application = self.am._current_application
def test_set_network_connection_status(self):
- self.au.set_network_connection_status(4)
+ self.au.set_network_connection_status(ConnectionType.DATA_ONLY)
def test_get_network_connection_status(self):
self.au.get_network_connection_status()

0 comments on commit 6fb1f7b

Please sign in to comment.