Rename application to Samsara and add assessment summary, detailed tabs and local Linux inventory

This commit is contained in:
2026-10-30 10:25:55 -07:00
parent 365f97942a
commit 967b2bd46a
37 changed files with 985 additions and 541 deletions

View File

@@ -1,17 +1,17 @@
import unittest
from unittest.mock import patch
from server_buddy.core.startup import desktop_error
from samsara.core.startup import desktop_error
class StartupTests(unittest.TestCase):
@patch('server_buddy.core.startup.sys.platform', 'linux')
@patch('samsara.core.startup.sys.platform', 'linux')
@patch.dict('os.environ', {'DISPLAY': ':0', 'QT_QPA_PLATFORM': 'xcb'}, clear=True)
@patch('server_buddy.core.startup.ctypes.CDLL', side_effect=OSError)
@patch('samsara.core.startup.ctypes.CDLL', side_effect=OSError)
def test_missing_xcb_returns_install_instruction(self, loader):
self.assertIn('sudo apt install libxcb-cursor0', desktop_error())
@patch('server_buddy.core.startup.sys.platform', 'linux')
@patch('samsara.core.startup.sys.platform', 'linux')
@patch.dict('os.environ', {'QT_QPA_PLATFORM': 'offscreen'}, clear=True)
@patch('server_buddy.core.startup.ctypes.CDLL')
@patch('samsara.core.startup.ctypes.CDLL')
def test_offscreen_does_not_require_xcb(self, loader):
self.assertIsNone(desktop_error())
loader.assert_not_called()