File size: 986 Bytes
f3ed77c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
import sys
import unittest


sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))


class TestMacOSAppBundleConfig(unittest.TestCase):
    def test_bundle_declares_microphone_permissions(self):
        from macos_app_config import INFO_PLIST

        self.assertIn("NSMicrophoneUsageDescription", INFO_PLIST)
        self.assertTrue(INFO_PLIST["NSMicrophoneUsageDescription"])
        self.assertIn("NSSpeechRecognitionUsageDescription", INFO_PLIST)
        self.assertTrue(INFO_PLIST["NSSpeechRecognitionUsageDescription"])

    def test_bundle_is_menubar_app(self):
        from macos_app_config import INFO_PLIST

        self.assertTrue(INFO_PLIST["LSUIElement"])

    def test_bundle_targets_native_entrypoint(self):
        from macos_app_config import APP_NAME, bundle_paths

        self.assertEqual(APP_NAME, "JARVIS")
        self.assertTrue(bundle_paths()["script"].is_file())
        self.assertTrue(bundle_paths()["icon_png"].is_file())