Beispiel #1
0
def test_get_inherited_properties_no_inheritance(cur, root):
    expected = {
        'type': 'root',
        'boolean': False,
        'integer': 1
    }
    assert get_inherited_properties(cur, root) == expected
Beispiel #2
0
def test_get_inherited_properties_multiple_inheritance(cur, nd2_1_1):
    expected = {
        'title': 'Node 2-1-1',
        'type': 'nd2_1_1',
        'boolean': False,
        'integer': 1,
        'foo': 'bar'
    }
    assert get_inherited_properties(cur, nd2_1_1) == expected
Beispiel #3
0
def test_get_inherited_properties_simple_inheritance(cur, nd2):
    expected = {
        'title': 'Node 2',
        'type': 'nd2',
        'boolean': True,
        'foo': 'bar',
        'integer': 1
    }
    assert get_inherited_properties(cur, nd2.id) == expected
Beispiel #4
0
def test_get_inherited_properties_multiple_inheritance(cur, nd2_1_1):
    expected = {
        'title': 'Node 2-1-1',
        'type': 'nd2_1_1',
        'boolean': False,
        'integer': 1,
        'foo': 'bar'
    }
    assert get_inherited_properties(cur, nd2_1_1) == expected
Beispiel #5
0
def test_get_inherited_properties_simple_inheritance(cur, nd2):
    expected = {
        'title': 'Node 2',
        'type': 'nd2',
        'boolean': True,
        'foo': 'bar',
        'integer': 1
    }
    assert get_inherited_properties(cur, nd2.id) == expected
Beispiel #6
0
def test_get_inherited_properties_no_inheritance(cur, root):
    expected = {
        'type': 'root',
        'boolean': False,
        'integer': 1,
        'dict': {'key': 'value'},
        'list': [{'abc': 2}]
    }
    assert get_inherited_properties(cur, root) == expected
Beispiel #7
0
def test_get_inherited_properties_multiple_inheritance(cur, nd2_1_1):
    expected = {
        'title': 'Node 2-1-1',
        'type': 'nd2_1_1',
        'boolean': False,
        'integer': 1,
        'foo': 'bar',
        'dict': {'key': 'yet another value'},
        'list': [{'def': 4}]
    }
    assert get_inherited_properties(cur, nd2_1_1) == expected
Beispiel #8
0
def test_get_inherited_properties_simple_inheritance(cur, nd2):
    expected = {
        'title': 'Node 2',
        'type': 'nd2',
        'boolean': True,
        'foo': 'bar',
        'integer': 1,
        'dict': {'another key': 'another value'},
        'list': [{'abc': 2}]
    }
    assert get_inherited_properties(cur, nd2.id) == expected
Beispiel #9
0
def test_get_inherited_properties_no_inheritance(cur, root):
    expected = {'type': 'root', 'boolean': False, 'integer': 1}
    assert get_inherited_properties(cur, root) == expected