Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.db.biosecure
Commits
964bad3e
Commit
964bad3e
authored
Dec 02, 2013
by
Laurent EL SHAFEY
Browse files
Add groups() method
parent
8f6647f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
xbob/db/biosecure/query.py
View file @
964bad3e
...
...
@@ -40,7 +40,7 @@ class Database(xbob.db.verification.utils.SQLiteDatabase):
# call base class constructors
xbob
.
db
.
verification
.
utils
.
SQLiteDatabase
.
__init__
(
self
,
SQLITE_FILE
,
File
)
def
groups
(
self
):
def
groups
(
self
,
protocol
=
None
):
"""Returns the names of all registered groups"""
return
ProtocolPurpose
.
group_choices
# Same as Client.group_choices for this database
...
...
xbob/db/biosecure/test.py
View file @
964bad3e
...
...
@@ -30,6 +30,7 @@ class BiosecureDatabaseTest(unittest.TestCase):
# test that the clients() function returns reasonable output
db
=
xbob
.
db
.
biosecure
.
Database
()
self
.
assertEqual
(
len
(
db
.
groups
()),
3
)
self
.
assertEqual
(
len
(
db
.
clients
()),
210
)
# TODO: more specific tests
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment