Example #1
0
    def test_decl(self):
        global MyField

        class MyField(form.Field):

            form.field('my-field')

        self._init_memphis()
        self.assertIs(form.getField('my-field'), MyField)
Example #2
0
    def test_decl_register(self):

        class MyField(form.Field):
            """ """
            
        form.registerField(MyField, 'my-field')

        self._init_memphis()
        self.assertIs(form.getField('my-field'), MyField)