Merge pull request #134 from tadashi0713/add_unittest_relaxed_security
Add unittest to run appium with relaxed security
This commit is contained in:
commit
98b0b3a140
|
@ -64,6 +64,19 @@ class TestApp(TestCase):
|
||||||
self.assertTrue(mocked_subprocess.called)
|
self.assertTrue(mocked_subprocess.called)
|
||||||
self.assertTrue(mocked_appium.called)
|
self.assertTrue(mocked_appium.called)
|
||||||
|
|
||||||
|
@mock.patch('src.app.prepare_avd')
|
||||||
|
@mock.patch('builtins.open')
|
||||||
|
@mock.patch('subprocess.Popen')
|
||||||
|
def test_run_with_appium_and_relaxed_security(self, mocked_avd, mocked_open, mocked_subprocess):
|
||||||
|
with mock.patch('src.app.appium_run') as mocked_appium:
|
||||||
|
os.environ['APPIUM'] = str(True)
|
||||||
|
os.environ['RELAXED_SECURITY'] = str(True)
|
||||||
|
app.run()
|
||||||
|
self.assertTrue(mocked_avd.called)
|
||||||
|
self.assertTrue(mocked_open.called)
|
||||||
|
self.assertTrue(mocked_subprocess.called)
|
||||||
|
self.assertTrue(mocked_appium.called)
|
||||||
|
|
||||||
@mock.patch('src.app.prepare_avd')
|
@mock.patch('src.app.prepare_avd')
|
||||||
@mock.patch('builtins.open')
|
@mock.patch('builtins.open')
|
||||||
@mock.patch('subprocess.Popen')
|
@mock.patch('subprocess.Popen')
|
||||||
|
|
Loading…
Reference in a new issue