collection: Have gobject-introspection and glib-mkenums recognize flags
[platform/upstream/libsecret.git] / libsecret / tests / mock-service-lock.py
1 #!/usr/bin/env python
2
3 #
4 # Copyright 2012 Red Hat Inc.
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as published
8 # by the Free Software Foundation; either version 2.1 of the licence or (at
9 # your option) any later version.
10 #
11 # See the included COPYING file for more information.
12 #
13
14 import dbus
15 import mock
16 import sys
17
18 service = mock.SecretService()
19 service.add_standard_objects()
20
21 collection = mock.SecretCollection(service, "lockone", locked=False, confirm=False)
22 mock.SecretItem(collection, "item", attributes={ "number": "1", "string": "one", "even": "false" }, secret="uno")
23 mock.SecretItem(collection, "confirm", attributes={ "number": "2", "string": "two", "even": "true" }, secret="dos", confirm=True)
24
25 collection = mock.SecretCollection(service, "lockprompt", locked=True, confirm=True)
26 mock.SecretItem(collection, "locked", attributes={ "number": "3", "string": "three", "even": "false" }, secret="tres")
27
28 service.listen()