def test_initial_sync(): person = Person(name='George') editor = create_editor(person) _, field = editor.children assert field.text == 'George'
def test_exclude(): class Person2(Atom): name = Unicode().tag(exclude=True) person = Person2() editor = create_editor(person) assert 0 == len(editor.children)
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'
def test_simple_editor(): person = Person() editor = create_editor(person) assert 2 == len(editor.children)