<s> import unittest <EOL> from appium import webdriver <EOL> from appium . webdriver . connectiontype import ConnectionType <EOL> import desired_capabilities <EOL> SLEEPY_TIME = <NUM_LIT:1> <EOL> class NetworkConnectionTests ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> desired_caps = desired_capabilities . get_desired_capabilities ( '<STR_LIT>' ) <EOL> self . driver = webdriver . Remote ( '<STR_LIT>' , desired_caps ) <EOL> def tearDown ( self ) : <EOL> self . driver . quit ( ) <EOL> def test_get_network_connection ( self ) : <EOL> nc = self . driver . network_connection <EOL> self . assertIsInstance ( nc , int ) <EOL> def test_set_network_connection ( self ) : <EOL> nc = self . driver . set_network_connection ( ConnectionType . DATA_ONLY ) <EOL> self . assertIsInstance ( nc , int ) <EOL> self . assertEqual ( nc , ConnectionType . DATA_ONLY ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> suite = unittest . TestLoader ( ) . loadTestsFromTestCase ( NetworkConnectionTests ) <EOL> unittest . TextTestRunner ( verbosity = <NUM_LIT:2> ) . run ( suite ) </s>
