Skip to content

Commit

Permalink
Merge pull request #134 from tadashi0713/add_unittest_relaxed_security
Browse files Browse the repository at this point in the history
Add unittest to run appium with relaxed security
  • Loading branch information
budtmo authored Jan 7, 2019
2 parents 442a10a + 2c9c421 commit 98b0b3a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/tests/unit/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ def test_run_with_appium(self, mocked_avd, mocked_open, mocked_subprocess):
self.assertTrue(mocked_subprocess.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('builtins.open')
@mock.patch('subprocess.Popen')
Expand Down

0 comments on commit 98b0b3a

Please sign in to comment.