Ejemplo n.º 1
0
 def testUniqueName(self):
     """Test Entry.GetUniqueName"""
     Node = collections.namedtuple('Node', ['name', 'parent'])
     base_node = Node('root', None)
     base_entry = entry.Entry(None, None, base_node)
     self.assertEqual('root', base_entry.GetUniqueName())
     sub_node = Node('subnode', base_node)
     sub_entry = entry.Entry(None, None, sub_node)
     self.assertEqual('root.subnode', sub_entry.GetUniqueName())
Ejemplo n.º 2
0
 def testGetDefaultFilename(self):
     """Trivial test for this base class function"""
     base_entry = entry.Entry(None, None, None)
     self.assertIsNone(base_entry.GetDefaultFilename())
Ejemplo n.º 3
0
 def testEntryContents(self):
     """Test the Entry bass class"""
     from binman import entry
     base_entry = entry.Entry(None, None, None)
     self.assertEqual(True, base_entry.ObtainContents())