mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 07:04:16 +02:00
- Native runtime under bearhub/ (api, commons, gems, view/util, view/core, view/qt) - bauh/ compatibility re-export shims for legacy imports - Phase D: canonical __version__/__app_name__ in bearhub/__init__.py; pyproject.toml and setup.py point at bearhub package - Native gem loader at bearhub/view/core/gems.py - Namespace compatibility tests (159 tests passing) - Documentation: CHANGELOG [Unreleased], NAMESPACE_MIGRATION, ROADMAP, README, CONTRIBUTING, docs/qt6-migration.md, packaging/aur/README.md
24 lines
837 B
Python
24 lines
837 B
Python
from unittest import TestCase
|
|
from unittest.mock import patch, Mock
|
|
|
|
|
|
from bearhub.gems.flatpak import flatpak, VERSION_1_2
|
|
|
|
|
|
class FlatpakTest(TestCase):
|
|
|
|
@patch("bearhub.gems.flatpak.flatpak.SimpleProcess")
|
|
@patch("bearhub.gems.flatpak.flatpak.ProcessHandler.handle_simple", return_value=(True, """
|
|
Looking for updates...
|
|
|
|
\tID\tArch\tBranch\tRemote\tDownload
|
|
1.\t \torg.xpto.Xnote\tx86_64\tstable\tflathub\t< 4.3 MB
|
|
|
|
"""))
|
|
def test_map_update_download_size__for_flatpak_1_2(self, SimpleProcess: Mock, handle_simple: Mock):
|
|
download_size = flatpak.map_update_download_size(app_ids={'org.xpto.Xnote'}, installation='user', version=VERSION_1_2)
|
|
SimpleProcess.assert_called_once()
|
|
handle_simple.assert_called_once()
|
|
|
|
self.assertEqual({'org.xpto.Xnote': 4300000}, download_size)
|