Commit 5c565d4a authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Fix the dummy database

parent dc7401bf
Pipeline #3467 passed with stages
in 44 minutes and 45 seconds
from bob.bio.db import ZTBioDatabase, AtntBioDatabase
from bob.bio.db import ZTBioDatabase
from bob.bio.base.test.utils import atnt_database_directory
......@@ -14,13 +14,14 @@ class DummyDatabase(ZTBioDatabase):
training_depends_on_protocol=False,
models_depend_on_protocol=False
)
self.__db = AtntBioDatabase()
import bob.db.atnt
self.__db = bob.db.atnt.Database()
def model_ids(self, group=None, protocol=None, gender=None):
return self.__db.model_ids(group, protocol, gender)
def model_ids_with_protocol(self, groups=None, protocol=None, **kwargs):
return self.__db.model_ids(groups, protocol)
def objects(self, groups=None, protocol=None, purposes=None, model_ids=None, **kwargs):
return self.__db.objects(groups, protocol, purposes, model_ids, **kwargs)
return self.__db.objects(model_ids, groups, purposes, protocol, **kwargs)
def tobjects(self, groups=None, protocol=None, model_ids=None, **kwargs):
return []
......@@ -28,14 +29,14 @@ class DummyDatabase(ZTBioDatabase):
def zobjects(self, groups=None, protocol=None, **kwargs):
return []
def tmodel_ids(self, protocol=None, groups=None, **kwargs):
def tmodel_ids_with_protocol(self, protocol=None, groups=None, **kwargs):
return self.__db.model_ids(groups)
def t_enroll_files(self, t_model_id, group='dev'):
return self.__db.enroll_files(t_model_id, group)
return self.enroll_files(t_model_id, group)
def z_probe_files(self, group='dev'):
return self.__db.probe_files(None, group)
return self.probe_files(None, group)
# override all_files to return a one-element lists of files
def all_files(self, groups):
......
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