mitya57 / secretstorage

Python bindings to Freedesktop.org Secret Service API
https://secretstorage.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
115 stars 21 forks source link

3.3.2: pytest is failing #40

Open kloczek opened 2 years ago

kloczek commented 2 years ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is lis of modules installed in build env:

```console Package Version ----------------------------- ----------------- alabaster 0.7.12 attrs 22.1.0 Babel 2.10.2 build 0.8.0 cffi 1.15.1 charset-normalizer 2.1.0 codespell 2.1.0 cryptography 36.0.2 dbus-python 1.2.18 distro 1.7.0 docutils 0.18.1 extras 1.0.0 fixtures 4.0.0 gpg 1.17.1-unknown idna 3.3 imagesize 1.4.1 importlib-metadata 4.12.0 iniconfig 1.1.1 jeepney 0.8.0 Jinja2 3.1.1 libcomps 0.1.18 MarkupSafe 2.1.1 packaging 21.3 pbr 5.9.0 pep517 0.12.0 pip 22.2.1 pluggy 1.0.0 ply 3.11 py 1.11.0 pycparser 2.21 Pygments 2.12.0 PyGObject 3.42.2 pyparsing 3.0.9 pytest 7.1.2 python-dateutil 2.8.2 pytz 2022.1 requests 2.28.1 rpm 4.17.0 setuptools 63.4.2 six 1.16.0 snowballstemmer 2.2.0 Sphinx 5.1.1 sphinxcontrib-applehelp 1.0.2.dev20220730 sphinxcontrib-devhelp 1.0.2.dev20220730 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1.dev20220730 sphinxcontrib-qthelp 1.0.3.dev20220730 sphinxcontrib-serializinghtml 1.1.5 testtools 2.5.0 tomli 2.0.1 transaction 3.0.1 urllib3 1.26.11 wheel 0.37.1 zipp 3.8.1 zope.event 4.5.0 zope.interface 5.4.0 ```
kloczek commented 2 years ago

Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-secretstorage-3.3.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-secretstorage-3.3.2-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/secretstorage-3.3.2 collected 26 items tests/test_collection.py FFFFsssss [ 34%] tests/test_context_manager.py F [ 38%] tests/test_dhcrypto.py . [ 42%] tests/test_exceptions.py FFF [ 53%] tests/test_item.py FFFFFFFFFFF [ 96%] tests/test_unlocking.py s [100%] ================================================================================= FAILURES ================================================================================= ___________________________________________________________________ CollectionTest.test_all_collections ____________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ______________________________________________________________________ CollectionTest.test_all_items _______________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException __________________________________________________________________ CollectionTest.test_create_empty_item ___________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ________________________________________________________________________ CollectionTest.test_label _________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException _____________________________________________________________ ContextManagerTest.test_closing_context_manager ______________________________________________________________ self = def test_closing_context_manager(self) -> None: with closing(dbus_init()) as connection: > self.assertTrue(check_service_availability(connection)) E AssertionError: False is not true tests/test_context_manager.py:20: AssertionError ___________________________________________________________________ ExceptionsTest.test_double_deleting ____________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = secretstorage.dbus_init() > self.collection = secretstorage.get_any_collection(self.connection) tests/test_exceptions.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException _______________________________________________________________ ExceptionsTest.test_non_existing_collection ________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = secretstorage.dbus_init() > self.collection = secretstorage.get_any_collection(self.connection) tests/test_exceptions.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException __________________________________________________________________ ExceptionsTest.test_non_existing_item ___________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = secretstorage.dbus_init() > self.collection = secretstorage.get_any_collection(self.connection) tests/test_exceptions.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException _________________________________________________________________________ ItemTest.test_attributes _________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException __________________________________________________________________________ ItemTest.test_created ___________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ___________________________________________________________________________ ItemTest.test_equal ____________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException _____________________________________________________________________ ItemTest.test_item_in_all_items ______________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ___________________________________________________________________________ ItemTest.test_label ____________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException __________________________________________________________________________ ItemTest.test_modified __________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException _________________________________________________________________________ ItemTest.test_searchable _________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ___________________________________________________________________________ ItemTest.test_secret ___________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ____________________________________________________________________ ItemTest.test_secret_content_type _____________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException _____________________________________________________________________ ItemTest.test_secret_wrong_type ______________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ___________________________________________________________________________ ItemTest.test_unlock ___________________________________________________________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name is not activatable',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:173: in get_any_collection return Collection(connection) secretstorage/collection.py:44: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable secretstorage/util.py:58: SecretServiceNotAvailableException ========================================================================= short test summary info ========================================================================== SKIPPED [1] tests/test_collection.py:81: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:54: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:58: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:73: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:64: This test should only be run with the mocked server. SKIPPED [1] tests/test_unlocking.py:23: This test should only be run with the mocked server. FAILED tests/test_collection.py::CollectionTest::test_all_collections - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_collection.py::CollectionTest::test_all_items - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_collection.py::CollectionTest::test_create_empty_item - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_collection.py::CollectionTest::test_label - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_context_manager.py::ContextManagerTest::test_closing_context_manager - AssertionError: False is not true FAILED tests/test_exceptions.py::ExceptionsTest::test_double_deleting - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_exceptions.py::ExceptionsTest::test_non_existing_collection - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_exceptions.py::ExceptionsTest::test_non_existing_item - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_attributes - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_created - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_equal - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_item_in_all_items - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_label - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_modified - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_searchable - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_secret - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_secret_content_type - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_secret_wrong_type - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable FAILED tests/test_item.py::ItemTest::test_unlock - secretstorage.exceptions.SecretServiceNotAvailableException: The name is not activatable ================================================================= 19 failed, 1 passed, 6 skipped in 0.53s ================================================================== ```
mitya57 commented 2 years ago

Hi! You need either a real Secret Service daemon (e.g. gnome-keyring), or a mock implementation, like what I am using here (maybe without coverage, you don't need it): https://github.com/mitya57/secretstorage/blob/bf1e831954626d58551050d520f1fff2942a48cd/.github/workflows/main.yml#L19-L25

kloczek commented 2 years ago

mock implementation

Which one module provides that?

I've been trying to run over dbuss-run-session but it didn't help

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-secretstorage-3.3.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-secretstorage-3.3.2-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ dbus-run-session -- /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/secretstorage-3.3.2
collected 26 items

tests/test_collection.py FFFFsssss                                                                                                                                   [ 34%]
tests/test_context_manager.py F                                                                                                                                      [ 38%]
tests/test_dhcrypto.py .                                                                                                                                             [ 42%]
tests/test_exceptions.py FFF                                                                                                                                         [ 53%]
tests/test_item.py FFFFFFFFFFF                                                                                                                                       [ 96%]
tests/test_unlocking.py s                                                                                                                                            [100%]
mitya57 commented 2 years ago

Which one module provides that?

In my tests on GitHub I use libsecret's mock service. It is not part of binary packages, but it's present in upstream git repository, which I clone: https://gitlab.gnome.org/GNOME/libsecret.

I've been trying to run over dbuss-run-session but it didn't help

dbus-run-session alone is not enough. As I said, you need either gnome-keyring (or another implementation) or mock service (and tests/run_tests.py script).

Debian packaging uses the first approach — with gnome-keyring, see https://salsa.debian.org/python-team/packages/python-secretstorage/-/tree/debian/master/debian/tests.

kloczek commented 2 years ago

dbus-run-session alone is not enough. As I said, you need either gnome-keyring (or another implementation) or mock service (and tests/run_tests.py script).

Why not run all that on test env preparation inside pytest session to make testing less complecated? 🤔

mitya57 commented 2 years ago

I never thought about that. Patches are welcome :smile:

kloczek commented 2 years ago

Sorry I'm not bread and butter python developer I'm just more humble general packaging specialist .. so I have quite broad knowledge and exp but not so deep to be able easyly write such pieces. Nevertheless observing on large scale (I have now packagesd +1k python modules) what other python modules aredoing I think that future changes in this case could go in exactly that direction.

May I ask what exactly currently needs to be done to be able sucessfully run pytest based test suite? 🤔 Simple I need to implemet that in build procedure to have some baseline ..

mitya57 commented 2 years ago
  1. Clone https://gitlab.gnome.org/GNOME/libsecret or download the tarball from https://download.gnome.org/sources/libsecret/ and unpack it.
  2. In secretstorage source root, run dbus-run-session -- python ./tests/run_tests.py /path/to/libsecret/libsecret/mock-service-normal.py. Where /path/to/libsecret is path to unpacked/cloned tree.
kloczek commented 1 year ago

A bit odd testing procedure based on libsecret private code which is not installed by libsecret by the install target. Other thing is that IIRC pytest provides testing session initialization in which is possible to star whatever is needed for test units.

If that libsecret is useful outside of that project I would ask to libsecret maintainer to provide that as regular python module which libsecret and your project may have listed in build/test dependencies. 🤔

mitya57 commented 1 year ago

A bit odd testing procedure based on libsecret private code which is not installed by libsecret by the install target.

I agree it's weird, but it was the only Secret Service mock implementation I found, so I thought it's better to re-use it rather than write my own.

If that libsecret is useful outside of that project I would ask to libsecret maintainer to provide that as regular python module which libsecret and your project may have listed in build/test dependencies.

If you ask them to install the Python module somewhere, that would be nice.

kloczek commented 1 year ago

If you ask them to install the Python module somewhere, that would be nice.

I think that you shpold try to do that .. only because I would be not the best person which could express needs of making that code kind of official non-private code available for other libsecret consumers like your project 😄 😋

kloczek commented 1 year ago

Just only FTR updated pytest output for 3.3.3. Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-secretstorage-3.3.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-secretstorage-3.3.3-2.fc35.x86_64/usr/lib/python3.8/site-packages + dbus-run-session -- /usr/bin/pytest -ra -m 'not network' tests ============================= test session starts ============================== platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/secretstorage-3.3.3 collected 26 items tests/test_collection.py FFFFsssss [ 34%] tests/test_context_manager.py F [ 38%] tests/test_dhcrypto.py . [ 42%] tests/test_exceptions.py FFF [ 53%] tests/test_item.py FFFFFFFFFFF [ 96%] tests/test_unlocking.py s [100%] =================================== FAILURES =================================== _____________________ CollectionTest.test_all_collections ______________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ________________________ CollectionTest.test_all_items _________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ____________________ CollectionTest.test_create_empty_item _____________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException __________________________ CollectionTest.test_label ___________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_collection.py:21: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _______________ ContextManagerTest.test_closing_context_manager ________________ self = def test_closing_context_manager(self) -> None: with closing(dbus_init()) as connection: > self.assertTrue(check_service_availability(connection)) E AssertionError: False is not true tests/test_context_manager.py:20: AssertionError _____________________ ExceptionsTest.test_double_deleting ______________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = secretstorage.dbus_init() > self.collection = secretstorage.get_any_collection(self.connection) tests/test_exceptions.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _________________ ExceptionsTest.test_non_existing_collection __________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = secretstorage.dbus_init() > self.collection = secretstorage.get_any_collection(self.connection) tests/test_exceptions.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ____________________ ExceptionsTest.test_non_existing_item _____________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = secretstorage.dbus_init() > self.collection = secretstorage.get_any_collection(self.connection) tests/test_exceptions.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ___________________________ ItemTest.test_attributes ___________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ____________________________ ItemTest.test_created _____________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _____________________________ ItemTest.test_equal ______________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _______________________ ItemTest.test_item_in_all_items ________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _____________________________ ItemTest.test_label ______________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ____________________________ ItemTest.test_modified ____________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ___________________________ ItemTest.test_searchable ___________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _____________________________ ItemTest.test_secret _____________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException ______________________ ItemTest.test_secret_content_type _______________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _______________________ ItemTest.test_secret_wrong_type ________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException _____________________________ ItemTest.test_unlock _____________________________ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: > raise DBusErrorResponse(resp_msg) E jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',) secretstorage/util.py:48: DBusErrorResponse The above exception was the direct cause of the following exception: self = def setUp(self) -> None: self.connection = dbus_init() > self.collection = get_any_collection(self.connection) tests/test_item.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ secretstorage/collection.py:189: in get_any_collection return Collection(connection) secretstorage/collection.py:45: in __init__ self._collection.get_property('Label') secretstorage/util.py:67: in get_property (signature, value), = self.send_and_get_reply(msg) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = DBusAddressWrapper('/org/freedesktop/secrets/aliases/default', bus_name='org.freedesktop.secrets', interface='org.freedesktop.Secret.Collection') msg = Message(Header(, , , 1, 50, -1, fields={: 'Get', : 'ss'}), ('org.freedesktop.Secret.Collection', 'Label')) def send_and_get_reply(self, msg: Message) -> Any: try: resp_msg: Message = self._connection.send_and_get_reply(msg) if resp_msg.header.message_type == MessageType.error: raise DBusErrorResponse(resp_msg) return resp_msg.body except DBusErrorResponse as resp: if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT): raise ItemNotFoundException('Item does not exist!') from resp elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED, DBUS_NO_REPLY): data = resp.data if isinstance(data, tuple): data = data[0] > raise SecretServiceNotAvailableException(data) from resp E secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files secretstorage/util.py:58: SecretServiceNotAvailableException =========================== short test summary info ============================ SKIPPED [1] tests/test_collection.py:82: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:55: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:59: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:74: This test should only be run with the mocked server. SKIPPED [1] tests/test_collection.py:65: This test should only be run with the mocked server. SKIPPED [1] tests/test_unlocking.py:23: This test should only be run with the mocked server. FAILED tests/test_collection.py::CollectionTest::test_all_collections - secre... FAILED tests/test_collection.py::CollectionTest::test_all_items - secretstora... FAILED tests/test_collection.py::CollectionTest::test_create_empty_item - sec... FAILED tests/test_collection.py::CollectionTest::test_label - secretstorage.e... FAILED tests/test_context_manager.py::ContextManagerTest::test_closing_context_manager FAILED tests/test_exceptions.py::ExceptionsTest::test_double_deleting - secre... FAILED tests/test_exceptions.py::ExceptionsTest::test_non_existing_collection FAILED tests/test_exceptions.py::ExceptionsTest::test_non_existing_item - sec... FAILED tests/test_item.py::ItemTest::test_attributes - secretstorage.exceptio... FAILED tests/test_item.py::ItemTest::test_created - secretstorage.exceptions.... FAILED tests/test_item.py::ItemTest::test_equal - secretstorage.exceptions.Se... FAILED tests/test_item.py::ItemTest::test_item_in_all_items - secretstorage.e... FAILED tests/test_item.py::ItemTest::test_label - secretstorage.exceptions.Se... FAILED tests/test_item.py::ItemTest::test_modified - secretstorage.exceptions... FAILED tests/test_item.py::ItemTest::test_searchable - secretstorage.exceptio... FAILED tests/test_item.py::ItemTest::test_secret - secretstorage.exceptions.S... FAILED tests/test_item.py::ItemTest::test_secret_content_type - secretstorage... FAILED tests/test_item.py::ItemTest::test_secret_wrong_type - secretstorage.e... FAILED tests/test_item.py::ItemTest::test_unlock - secretstorage.exceptions.S... =================== 19 failed, 1 passed, 6 skipped in 0.38s ==================== ```
mitya57 commented 1 year ago

Sorry, I wanted to file a bug against libsecret but it got buried under a bunch of other tasks. Thanks for bringing it to the top again, I have done that now:

https://gitlab.gnome.org/GNOME/libsecret/-/issues/83

kloczek commented 1 year ago

👍 👀