def test_samsung_avd(self, mocked_suprocess, mocked_sys_link, mocked_open): self.assertFalse(mocked_sys_link.called) self.assertFalse(mocked_suprocess.called) self.assertFalse(mocked_open.called) app.prepare_avd('Samsung Galaxy S6', self.avd_name, '550m') self.assertTrue(mocked_sys_link.called) self.assertTrue(mocked_suprocess.called) self.assertTrue(mocked_open.called)
def test_samsung_avd(self, mocked_suprocess, mocked_sys_link, mocked_open): self.assertFalse(mocked_sys_link.called) self.assertFalse(mocked_suprocess.called) self.assertFalse(mocked_open.called) app.prepare_avd('Samsung Galaxy S6', self.avd_name) self.assertTrue(mocked_sys_link.called) self.assertTrue(mocked_suprocess.called) self.assertTrue(mocked_open.called)
def test_samsung_avd(self, mocked_suprocess, mocked_sys_link): with mock.patch('os.listdir') as mocked_list_dir: mocked_list_dir.return_value = ['file1', 'file2'] self.assertFalse(mocked_list_dir.called) self.assertFalse(mocked_sys_link.called) self.assertFalse(mocked_suprocess.called) app.prepare_avd('Samsung Galaxy S6', self.avd_name) self.assertTrue(mocked_list_dir.called) self.assertTrue(mocked_sys_link.called) self.assertTrue(mocked_suprocess.called)
def test_nexus_avd_as_default(self, mocked_suprocess, mocked_sys_link): with mock.patch('os.listdir') as mocked_list_dir: mocked_list_dir.return_value = ['file1', 'file2'] self.assertFalse(mocked_list_dir.called) self.assertFalse(mocked_sys_link.called) self.assertFalse(mocked_suprocess.called) app.prepare_avd('Nexus 5', self.avd_name) self.assertTrue(mocked_list_dir.called) self.assertTrue(mocked_sys_link.called) self.assertTrue(mocked_suprocess.called)
def test_nexus_avd_as_default(self, mocked_suprocess, mocked_open): self.assertFalse(mocked_suprocess.called) self.assertFalse(mocked_open.called) app.prepare_avd('Nexus 5', self.avd_name, '550m') self.assertTrue(mocked_suprocess.called) self.assertTrue(mocked_open.called)
def test_nexus_avd_as_default(self, mocked_suprocess, mocked_open): self.assertFalse(mocked_suprocess.called) self.assertFalse(mocked_open.called) app.prepare_avd('Nexus 5', self.avd_name) self.assertTrue(mocked_suprocess.called) self.assertTrue(mocked_open.called)