示例#1
0
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'
示例#2
0
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'
示例#3
0
def test_update_properties_only_allows_dict(cur, root):
    with pytest.raises(TypeError):
        update_properties(cur, root, [])
示例#4
0
def test_update_properties_only_allows_dict(cur, root):
    with pytest.raises(TypeError):
        update_properties(cur, root, [])