#!/usr/bin/env python3 import secretstorage connection = secretstorage.dbus_init() items = secretstorage.search_items(connection, {'application': 'secretstorage-test'}) for item in items: print('Deleting item with label %r.' % item.get_label()) item.delete()
#!/usr/bin/env python3 import secretstorage with secretstorage.create_connection() as connection: items = secretstorage.search_items(connection, {'application': 'secretstorage-test'}) for item in items: print('Deleting item with label %r.' % item.get_label()) item.delete()
def test_searchable(self) -> None: search_results = self.collection.search_items(ATTRIBUTES) self.assertIn(self.item, search_results) search_results = search_items(self.connection, ATTRIBUTES) self.assertIn(self.item, search_results)
#!/usr/bin/env python3 import secretstorage bus = secretstorage.dbus_init() items = secretstorage.search_items(bus, {'application': 'secretstorage-test'}) for item in items: print('Deleting item with label %r.' % item.get_label()) item.delete()