Beispiel #1
0
    def test_decl(self):
        @form.field("my-field")
        class MyField(form.Field):
            pass

        self.init_ptah()
        self.assertIs(form.get_field_factory("my-field"), MyField)
Beispiel #2
0
    def test_decl(self):
        @form.field('my-field')
        class MyField(form.Field):
            pass

        self.init_ptah()
        self.assertIs(form.get_field_factory('my-field'), MyField)
Beispiel #3
0
    def test_decl_register(self):
        class MyField(form.Field):
            """ """

        form.register_field_factory(MyField, "my-field")

        self.init_ptah()
        self.assertIs(form.get_field_factory("my-field"), MyField)
Beispiel #4
0
    def test_decl_register(self):
        class MyField(form.Field):
            """ """

        form.register_field_factory(MyField, 'my-field')

        self.init_ptah()
        self.assertIs(form.get_field_factory('my-field'), MyField)
Beispiel #5
0
    def test_decl_register(self):

        class MyField(form.Field):
            """ """

        form.field.register('my-field', MyField)

        self.init_ptah()
        self.assertIs(form.get_field_factory('my-field'), MyField)
Beispiel #6
0
    def test_decl(self):
        global MyField

        class MyField(form.Field):

            form.field('my-field')

        self._init_ptah()
        self.assertIs(form.get_field_factory('my-field'), MyField)