def testGetSplitsSplitApk(self): apk = apk_helper.ToSplitHelper( 'base.apk', ['split1.apk', 'split2.apk', 'split3.apk']) device = _MockDeviceUtils() with self.assertCalls( (mock.call.devil.android.sdk.split_select.SelectSplits( device, 'base.apk', ['split1.apk', 'split2.apk', 'split3.apk'], allow_cached_props=False), ['split2.apk'])),\ apk.GetApkPaths(device) as apk_paths: self.assertEquals(apk_paths, ['base.apk', 'split2.apk'])
def testToHelperSplitException(self): with self.assertRaises(apk_helper.ApkHelperError): apk_helper.ToSplitHelper(apk_helper.ToHelper('abc.apk'), ['a.apk', 'b.apk'])
def testToHelperSplitApk(self): apk = apk_helper.ToSplitHelper('abc.apk', ['a.apk', 'b.apk']) self.assertTrue(isinstance(apk, apk_helper.SplitApkHelper))