Fixed user reported bug. Turns out old debugging was still in place. Should be fixed now.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from cthulhu.plugins.self_voice import plugin
|
||||
|
||||
|
||||
class SelfVoicePluginRegressionTests(unittest.TestCase):
|
||||
def test_socket_file_is_scoped_to_user_runtime_directory(self) -> None:
|
||||
with mock.patch.dict(os.environ, {"XDG_RUNTIME_DIR": "/run/user/1000"}, clear=True):
|
||||
self.assertEqual(plugin._get_socket_file(), "/run/user/1000/cthulhu.sock")
|
||||
|
||||
def test_socket_file_is_unavailable_without_user_runtime_directory(self) -> None:
|
||||
with mock.patch.dict(os.environ, {}, clear=True):
|
||||
self.assertIsNone(plugin._get_socket_file())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user