-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More mock stuff #324
base: main
Are you sure you want to change the base?
More mock stuff #324
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #324 +/- ##
==========================================
- Coverage 75.26% 75.24% -0.03%
==========================================
Files 52 52
Lines 8950 8950
==========================================
- Hits 6736 6734 -2
- Misses 2214 2216 +2 ☔ View full report in Codecov by Sentry. |
Menu needs this.
d5644e8
to
5f8a5c6
Compare
self._qubes['test-vm2'] = MockQube(name="test-vm2", qapp=self, | ||
features={'menu-favorites': ''}) | ||
self._qubes['dom0'].features['menu-initial-page'] = 'favorites_page' | ||
self._qubes['dom0'].features['menu-sort-running'] = '1' | ||
self._qubes['dom0'].features['menu-position'] = 'mouse' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against it here, but wouldn't it be more convenient to have it in desktop-linux-menu, in a wrapper?
Simply add a file somewhere in tests/ directory that does:
def main():
"""
Start the menu app
"""
# if X is not running or other weird stuff is happening, exit with exit code
# 6 to signal to the service that this should not be restarted
if not Gtk.init_check()[0]:
sys.exit(6)
qapp = qubesadmin.tests.mock_app.MockQubesComplete()
qapp._qubes['test-vm2'] = MockQube(name="test-vm2", qapp=qapp,
features={'menu-favorites': ''})
qapp._qubes['dom0'].features['menu-initial-page'] = 'favorites_page'
qapp._qubes['dom0'].features['menu-sort-running'] = '1'
qapp._qubes['dom0'].features['menu-position'] = 'mouse'
qapp.update_vm_calls()
dispatcher = qubesadmin.tests.mock_app.MockDispatcher(qapp)
app = AppMenu(qapp, dispatcher)
app.run(sys.argv)
if __name__ == '__main__':
sys.exit(main())
Menu needs this.