mirror of
https://github.com/budtmo/docker-android.git
synced 2026-07-30 19:23:22 +00:00
Turn off appium server by default
This commit is contained in:
+1
-1
@@ -167,7 +167,7 @@ def run():
|
||||
cmd = 'emulator -avd {name}'.format(name=avd_name)
|
||||
subprocess.Popen(cmd.split())
|
||||
|
||||
appium = str_to_bool(str(os.getenv('APPIUM', True)))
|
||||
appium = str_to_bool(str(os.getenv('APPIUM', False)))
|
||||
if appium:
|
||||
logger.info('Run appium server...')
|
||||
appium_run(avd_name)
|
||||
|
||||
@@ -37,6 +37,7 @@ class TestApp(TestCase):
|
||||
@mock.patch('subprocess.Popen')
|
||||
def test_run_with_appium(self, mocked_avd, mocked_subprocess):
|
||||
with mock.patch('src.app.appium_run') as mocked_appium:
|
||||
os.environ['APPIUM'] = str(True)
|
||||
app.run()
|
||||
self.assertTrue(mocked_avd.called)
|
||||
self.assertTrue(mocked_subprocess.called)
|
||||
@@ -46,7 +47,6 @@ class TestApp(TestCase):
|
||||
@mock.patch('subprocess.Popen')
|
||||
def test_run_withhout_appium(self, mocked_avd, mocked_subprocess):
|
||||
with mock.patch('src.app.appium_run') as mocked_appium:
|
||||
os.environ['APPIUM'] = str(False)
|
||||
app.run()
|
||||
self.assertTrue(mocked_avd.called)
|
||||
self.assertTrue(mocked_subprocess.called)
|
||||
|
||||
Reference in New Issue
Block a user