2012-01-26 13:34:37 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2012-08-06 09:22:30 +00:00
|
|
|
#
|
|
|
|
# Copyright 2012 Red Hat Inc.
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License as published
|
|
|
|
# by the Free Software Foundation; either version 2.1 of the licence or (at
|
|
|
|
# your option) any later version.
|
|
|
|
#
|
|
|
|
# See the included COPYING file for more information.
|
|
|
|
#
|
|
|
|
|
2012-01-26 13:34:37 +00:00
|
|
|
import dbus
|
|
|
|
import mock
|
|
|
|
import sys
|
|
|
|
|
|
|
|
service = mock.SecretService()
|
|
|
|
service.add_standard_objects()
|
|
|
|
|
2012-01-31 19:20:31 +00:00
|
|
|
collection = mock.SecretCollection(service, "lockone", locked=False, confirm=False)
|
2012-01-26 13:34:37 +00:00
|
|
|
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)
|
|
|
|
|
2012-01-31 19:20:31 +00:00
|
|
|
collection = mock.SecretCollection(service, "lockprompt", locked=True, confirm=True)
|
2012-01-26 13:34:37 +00:00
|
|
|
mock.SecretItem(collection, "locked", attributes={ "number": "3", "string": "three", "even": "false" }, secret="tres")
|
|
|
|
|
2012-08-06 09:22:30 +00:00
|
|
|
service.listen()
|