5"""Tests for database module."""
19 def _ParseInterface(self, content):
23 def _ListInterfaces(self, db):
25 for interface
in db.GetInterfaces():
31 self.
_idl_parser = idlparser.IDLParser(idlparser.FREMONTCUT_SYNTAX)
33 working_dir = tempfile.mkdtemp()
40 db.AddInterface(interface)
59 self.assertTrue(db.HasInterface(
'I1'))
60 self.assertFalse(db.HasInterface(
'I2'))
66 db.AddInterface(interface)
75 db.DeleteInterface(
'I1')
84 interface = db.GetInterface(
'I1')
85 self.assertEqual(interface.id,
'I1')
88if __name__ ==
'__main__':
89 logging.config.fileConfig(
'logging.conf')
90 if __name__ ==
'__main__':
def testHasInterface(self)
def testListInterfaces(self)
def _ListInterfaces(self, db)
def _ParseInterface(self, content)
def testGetInterface(self)
def testDeleteInterface(self)
def testAddInterface(self)
def parse(repo_root, recipes_cfg_path)