Beispiel #1
0
def test_initial_sync():
    person = Person(name='George')
    editor = create_editor(person)

    _, field = editor.children

    assert field.text == 'George'
Beispiel #2
0
def test_exclude():
    class Person2(Atom):
        name = Unicode().tag(exclude=True)

    person = Person2()
    editor = create_editor(person)

    assert 0 == len(editor.children)
Beispiel #3
0
def test_label():
    class Person2(Atom):
        name = Unicode().tag(label='Full Name')

    p = Person2()
    editor = create_editor(p)

    label, _ = editor.children
    assert label.text == 'Full Name'
Beispiel #4
0
def test_simple_editor():
    person = Person()
    editor = create_editor(person)

    assert 2 == len(editor.children)