Exemplo n.º 1
0
 def test_list_nodes_with_bindings(self, mock_binding):
     # Test
     command = commands.NodeListCommand(self.context)
     command.run(fields=None)
     # Verify
     mock_binding.assert_called_with(bindings=False, details=False)
     lines = self.recorder.lines
     self.assertEqual(len(lines), 16)
     self.assertTrue(commands.NODE_LIST_TITLE in lines[1])
Exemplo n.º 2
0
 def test_list_nodes_no_nodes(self, mock_binding):
     # Test
     command = commands.NodeListCommand(self.context)
     command.run(fields=None)
     # Verify
     mock_binding.assert_called_with(bindings=False, details=False)
     lines = self.recorder.lines
     self.assertEqual(len(lines), 6)
     self.assertTrue('Child Nodes' in lines[3])