# Path: wokkel/data_form.py
# NS_X_DATA = 'jabber:x:data'
# class Error(Exception):
# class FieldNameRequiredError(Error):
# class TooManyValuesError(Error):
# class Option(object):
# class Field(object):
# class Form(object):
#     def __init__(self, value, label=None):
#     def __repr__(self):
#     def toElement(self):
#     def fromElement(element):
#     def __init__(self, fieldType='text-single', var=None, value=None,
#                        values=None, options=None, label=None, desc=None,
#                        required=False):
#     def __repr__(self):
#     def __value_set(self, value):
#     def __value_get(self):
#     def typeCheck(self):
#     def toElement(self, asForm=False):
#     def _parse_desc(field, element):
#     def _parse_option(field, element):
#     def _parse_required(field, element):
#     def _parse_value(field, element):
#     def fromElement(element):
#     def fromDict(fieldDict):
#     def __init__(self, formType, title=None, instructions=None,
#                        formNamespace=None, fields=None):
#     def __repr__(self):
#     def addField(self, field):
#     def removeField(self, field):
#     def makeFields(self, values, fieldDefs=None, filterUnknown=True):
#     def toElement(self):
#     def _parse_title(form, element):
#     def _parse_instructions(form, element):
#     def _parse_field(form, element):
#     def fromElement(element):
#     def __iter__(self):
#     def __len__(self):
#     def __getitem__(self, key):
#     def get(self, key, default=None):
#     def __contains__(self, key):
#     def iterkeys(self):
#     def itervalues(self):
#     def iteritems(self):
#         def keys(self):
#         def values(self):
#         def items(self):
#     def getValues(self):
#     def typeCheck(self, fieldDefs=None, filterUnknown=False):
# def findForm(element, formNamespace):


from zope.interface import verify
from zope.interface.common.mapping import IIterableMapping
from twisted.python.compat import unicode, _PY3
from twisted.trial import unittest
from twisted.words.xish import domish
from twisted.words.protocols.jabber import jid
from wokkel import data_form
# Copyright (c) Ralph Meijer.
# See LICENSE for details.

"""
Tests for {wokkel.data_form}.
"""

from __future__ import division, absolute_import




NS_X_DATA = 'jabber:x:data'

class OptionTest(unittest.TestCase):
    """
    Tests for L{data_form.Option}.
    """

    def test_toElement(self):
        """
        An option is an option element with a value child with the option value.
        """

# Path: wokkel/data_form.py
# NS_X_DATA = 'jabber:x:data'
# class Error(Exception):
# class FieldNameRequiredError(Error):
# class TooManyValuesError(Error):
# class Option(object):
# class Field(object):
# class Form(object):
#     def __init__(self, value, label=None):
#     def __repr__(self):
#     def toElement(self):
#     def fromElement(element):
#     def __init__(self, fieldType='text-single', var=None, value=None,
#                        values=None, options=None, label=None, desc=None,
#                        required=False):
#     def __repr__(self):
#     def __value_set(self, value):
#     def __value_get(self):
#     def typeCheck(self):
#     def toElement(self, asForm=False):
#     def _parse_desc(field, element):
#     def _parse_option(field, element):
#     def _parse_required(field, element):
#     def _parse_value(field, element):
#     def fromElement(element):
#     def fromDict(fieldDict):
#     def __init__(self, formType, title=None, instructions=None,
#                        formNamespace=None, fields=None):
#     def __repr__(self):
#     def addField(self, field):
#     def removeField(self, field):
#     def makeFields(self, values, fieldDefs=None, filterUnknown=True):
#     def toElement(self):
#     def _parse_title(form, element):
#     def _parse_instructions(form, element):
#     def _parse_field(form, element):
#     def fromElement(element):
#     def __iter__(self):
#     def __len__(self):
#     def __getitem__(self, key):
#     def get(self, key, default=None):
#     def __contains__(self, key):
#     def iterkeys(self):
#     def itervalues(self):
#     def iteritems(self):
#         def keys(self):
#         def values(self):
#         def items(self):
#     def getValues(self):
#     def typeCheck(self, fieldDefs=None, filterUnknown=False):
# def findForm(element, formNamespace):


# Path: wokkel/test/test_data_form.py
from zope.interface import verify
from zope.interface.common.mapping import IIterableMapping
from twisted.python.compat import unicode, _PY3
from twisted.trial import unittest
from twisted.words.xish import domish
from twisted.words.protocols.jabber import jid
from wokkel import data_form

# Copyright (c) Ralph Meijer.
# See LICENSE for details.

"""
Tests for {wokkel.data_form}.
"""

from __future__ import division, absolute_import




NS_X_DATA = 'jabber:x:data'

class OptionTest(unittest.TestCase):
    """
    Tests for L{data_form.Option}.
    """

    def test_toElement(self):
        """
        An option is an option element with a value child with the option value.
        """

        option = data_form.Option('value')