mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 12:48:51 +00:00
17 lines
674 B
Python
17 lines
674 B
Python
|
#!/usr/bin/env python
|
||
|
|
||
|
import dbus
|
||
|
import mock
|
||
|
import sys
|
||
|
|
||
|
service = mock.SecretService()
|
||
|
service.add_standard_objects()
|
||
|
|
||
|
collection = mock.SecretCollection(service, "lock_one", locked=False, confirm=False)
|
||
|
mock.SecretItem(collection, "item", attributes={ "number": "1", "string": "one", "even": "false" }, secret="uno")
|
||
|
mock.SecretItem(collection, "confirm", attributes={ "number": "2", "string": "two", "even": "true" }, secret="dos", confirm=True)
|
||
|
|
||
|
collection = mock.SecretCollection(service, "lock_prompt", locked=True, confirm=True)
|
||
|
mock.SecretItem(collection, "locked", attributes={ "number": "3", "string": "three", "even": "false" }, secret="tres")
|
||
|
|
||
|
service.listen()
|