2011-09-25 16:39:03 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import mock
|
|
|
|
|
|
|
|
service = mock.SecretService()
|
2011-11-05 20:50:01 +00:00
|
|
|
|
|
|
|
collection = mock.SecretCollection(service, "collection", locked=False)
|
|
|
|
mock.SecretItem(collection, "item_one", attributes={ "number": "1", "string": "one", "parity": "odd" })
|
|
|
|
mock.SecretItem(collection, "item_two", attributes={ "number": "2", "string": "two", "parity": "even" })
|
|
|
|
mock.SecretItem(collection, "item_three", attributes={ "number": "3", "string": "three", "parity": "odd" })
|
|
|
|
|
|
|
|
collection = mock.SecretCollection(service, "second", locked=True)
|
|
|
|
mock.SecretItem(collection, "item_one", attributes={ "number": "1", "string": "one", "parity": "odd" })
|
|
|
|
mock.SecretItem(collection, "item_two", attributes={ "number": "2", "string": "two", "parity": "even" })
|
|
|
|
mock.SecretItem(collection, "item_three", attributes={ "number": "3", "string": "three", "parity": "odd" })
|
|
|
|
|
2011-09-25 16:39:03 +00:00
|
|
|
service.listen()
|