Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setUp(self) -> None:
self.connection = dbus_init()
collection_path = "/org/freedesktop/secrets/collection/english"
self.collection = Collection(self.connection, collection_path)
def test_all_collections(self) -> None:
labels = map(Collection.get_label, get_all_collections(self.connection))
self.assertIn(self.collection.get_label(), labels)
def test_deleting_prompt(self) -> None:
collection_path = "/org/freedesktop/secrets/collection/lockprompt"
try:
collection = Collection(self.connection, collection_path)
except ItemNotFoundException:
self.skipTest("This test should only be run with mock-service-lock.")
collection.unlock()
collection.delete()
def test_deleting(self) -> None:
collection_path = "/org/freedesktop/secrets/collection/spanish"
collection = Collection(self.connection, collection_path)
collection.unlock()
collection.delete()