def test_validate_nodes_bad_node(self): """ A list of nodes is only valid is the nodes contained therein are also valid. """ self.assertFalse(validate_nodes([[123, '0.1', 'http://192.168.0.1:9999/']]))
def test_validate_nodes_wrong_type(self): """ Nodes can only be expressed in lists. """ self.assertFalse(validate_nodes((['id', '0.1', 'http://192.168.0.1:9999/'], )))
def test_validate_nodes(self): """ A list of zero or more nodes is valid. """ self.assertTrue(validate_nodes([['id', '0.1', 'http://192.168.0.1:9999/'], ]))