Commit 8a5861f5 authored by Laurent EL SHAFEY's avatar Laurent EL SHAFEY
Browse files

Add groups() method

parent cc10f2da
......@@ -35,6 +35,10 @@ class Database(xbob.db.verification.utils.Database):
self.m_training_clients = set([1,2,5,6,10,11,12,14,16,17,20,21,24,26,27,29,33,34,36,39])
self.m_enrol_files = set([2,4,5,7,9])
def groups(self, protocol=None):
"""Returns the names of all registered groups"""
return self.m_groups
def clients(self, groups = None, protocol = None):
"""Returns the vector of clients used in a given group
......@@ -29,6 +29,9 @@ class ATNTDatabaseTest(unittest.TestCase):
def test01_query(self):
db = Database()
f = db.groups()
self.assertEqual(len(f), 2) # number of groups
f = db.objects()
self.assertEqual(len(f), 400) # number of all files in the database
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment