Esempio n. 1
0
 def test_uninstall_base(self) -> None:
     if self._package_name not in self._device.list_installed_packages():
         return
     app = Application(self._device, {'package_name': self._package_name})
     app.uninstall()
     if self._package_name in self._device.list_installed_packages():
         raise UpgradeTestException(
             f"Uninstall base package {self._package_name} failed")
Esempio n. 2
0
 def test_uninstall_upgrade(self, upgrade_apk: str) -> None:
     package = AXMLParser.parse(upgrade_apk).package_name
     if package not in self._device.list_installed_packages():
         return
     app = Application(self._device, {'package_name': package})
     app.stop()
     app.uninstall()
     if package in self._device.list_installed_packages():
         raise UpgradeTestException(
             f"Uninstall upgrade package {package} failed")
 def test_app_uninstall_logs_error(self, device: Device):
     with patch("androidtestorchestrator.application.log") as mock_logger:
         app = Application(manifest={
             'package_name':
             "com.android.providers.calendar",
             'permissions': ["android.permission.WRITE_EXTERNAL_STORAGE"]
         },
                           device=device)
         app.uninstall()
         assert mock_logger.error.called