def test_update_properties(cur, root): properties = root.properties.copy() properties['title'] = 'Root node' properties['new'] = 'property' root = update_properties(cur, root.id, properties) assert root.properties['title'] == 'Root node' assert root.properties['new'] == 'property'
def test_update_properties_only_allows_dict(cur, root): with pytest.raises(TypeError): update_properties(cur, root, [])