def test_core_caches_creates_list(self): core = Node({'caches':[{'size':'test'},{'size':'test'}]}) self.assertEqual(len(core.caches), 2)
def test_core_caches_list_of_correct_type(self): core = Node({'caches':[{'size':'test'},{'size':'test'}]}) self.assertTrue(all(isinstance(x, Cache) for x in core.caches))
def test_node_cores_list_of_correct_type(self): node = Node({'cores':[{'core_id':'test'},{'core_id':'test'}]}) self.assertTrue(all(isinstance(x, Core) for x in node.cores))
def test_node_cores_creates_list(self): node = Node({'cores':[{'core_id':'test'},{'core_id':'test'}]}) self.assertEqual(len(node.cores), 2)
def test_node_filesystems_list_of_correct_type(self): node = Node({'filesystems':[{'device':'test'},{'device':'test'}]}) self.assertTrue(all(isinstance(x, FsInfo) for x in node.filesystems))
def test_node_memory(self): node = Node({'memory':'test'}) self.assertEqual(node.memory, 'test')
def test_node_node_id(self): node = Node({'node_id':'test'}) self.assertEqual(node.node_id, 'test')