def test_validate_correct_node(node): n = Transformer.validate_node(node) assert n is not None assert 'category' in n assert n['category'][0] == Transformer.DEFAULT_NODE_CATEGORY
def test_validate_incorrect_node(node): with pytest.raises(KeyError): Transformer.validate_node(node)