# Path: openid/extension.py
# class Extension(object):
#     def getExtensionArgs(self):
#     def toMessage(self, message=None):
# 
# Path: openid/message.py
# IDENTIFIER_SELECT = 'http://specs.openid.net/auth/2.0/identifier_select'
# SREG_URI = 'http://openid.net/sreg/1.0'
# OPENID1_NS = 'http://openid.net/signon/1.0'
# THE_OTHER_OPENID1_NS = 'http://openid.net/signon/1.1'
# OPENID1_NAMESPACES = OPENID1_NS, THE_OTHER_OPENID1_NS
# OPENID2_NS = 'http://specs.openid.net/auth/2.0'
# NULL_NAMESPACE = oidutil.Symbol('Null namespace')
# OPENID_NS = oidutil.Symbol('OpenID namespace')
# BARE_NS = oidutil.Symbol('Bare namespace')
# OPENID1_URL_LIMIT = 2047
# OPENID_PROTOCOL_FIELDS = [
#     'ns', 'mode', 'error', 'return_to', 'contact', 'reference',
#     'signed', 'assoc_type', 'session_type', 'dh_modulus', 'dh_gen',
#     'dh_consumer_public', 'claimed_id', 'identity', 'realm',
#     'invalidate_handle', 'op_endpoint', 'response_nonce', 'sig',
#     'assoc_handle', 'trust_root', 'openid',
# ]
# class UndefinedOpenIDNamespace(ValueError):
# class InvalidOpenIDNamespace(ValueError):
# class InvalidNamespace(KeyError):
# class NamespaceAliasRegistrationError(Exception):
# class Message(object):
# class NamespaceMap(object):
#     def __init__(self, *args, **kwargs):
#     def __str__(self):
# def registerNamespaceAlias(namespace_uri, alias):
#     def __init__(self, openid_namespace=None, implicit_namespace=None):
#     def fromPostArgs(cls, args):
#     def fromOpenIDArgs(cls, openid_args):
#     def _fromOpenIDArgs(cls, openid_args):
#     def _getDefaultNamespace(self, mystery_alias):
#     def _setOpenIDNamespace(self, openid_ns_uri, implicit):
#     def setOpenIDNamespace(self, openid_ns_uri, implicit):
#     def getOpenIDNamespace(self):
#     def isOpenID1(self):
#     def isOpenID2(self):
#     def fromKVForm(cls, kvform_string):
#     def copy(self):
#     def toPostArgs(self):
#     def toArgs(self):
#     def toFormMarkup(self, action_url, form_tag_attrs=None,
#                      submit_text="Continue"):
#     def toURL(self, base_url):
#     def toKVForm(self):
#     def toURLEncoded(self):
#     def _fixNS(self, namespace):
#     def hasKey(self, namespace, ns_key):
#     def getKey(self, namespace, ns_key):
#     def getArg(self, namespace, key, default=None):
#     def getArgs(self, namespace):
#     def updateArgs(self, namespace, updates):
#     def setArg(self, namespace, key, value):
#     def delArg(self, namespace, key):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def getAliasedArg(self, aliased_key, default=None):
#     def __init__(self):
#     def getAlias(self, namespace_uri):
#     def getNamespaceURI(self, alias):
#     def iterNamespaceURIs(self):
#     def iterAliases(self):
#     def items(self):
#     def iteritems(self):
#     def addAlias(self, namespace_uri, desired_alias, implicit=False):
#     def add(self, namespace_uri):
#     def isDefined(self, namespace_uri):
#     def __contains__(self, namespace_uri):
#     def isImplicit(self, namespace_uri):


import unittest
from openid import extension, message
from __future__ import unicode_literals




class DummyExtension(extension.Extension):
    ns_uri = 'http://an.extension/'
    ns_alias = 'dummy'

    def getExtensionArgs(self):
        return {}


class ToMessageTest(unittest.TestCase):
    def test_OpenID1(self):

# Path: openid/extension.py
# class Extension(object):
#     def getExtensionArgs(self):
#     def toMessage(self, message=None):
# 
# Path: openid/message.py
# IDENTIFIER_SELECT = 'http://specs.openid.net/auth/2.0/identifier_select'
# SREG_URI = 'http://openid.net/sreg/1.0'
# OPENID1_NS = 'http://openid.net/signon/1.0'
# THE_OTHER_OPENID1_NS = 'http://openid.net/signon/1.1'
# OPENID1_NAMESPACES = OPENID1_NS, THE_OTHER_OPENID1_NS
# OPENID2_NS = 'http://specs.openid.net/auth/2.0'
# NULL_NAMESPACE = oidutil.Symbol('Null namespace')
# OPENID_NS = oidutil.Symbol('OpenID namespace')
# BARE_NS = oidutil.Symbol('Bare namespace')
# OPENID1_URL_LIMIT = 2047
# OPENID_PROTOCOL_FIELDS = [
#     'ns', 'mode', 'error', 'return_to', 'contact', 'reference',
#     'signed', 'assoc_type', 'session_type', 'dh_modulus', 'dh_gen',
#     'dh_consumer_public', 'claimed_id', 'identity', 'realm',
#     'invalidate_handle', 'op_endpoint', 'response_nonce', 'sig',
#     'assoc_handle', 'trust_root', 'openid',
# ]
# class UndefinedOpenIDNamespace(ValueError):
# class InvalidOpenIDNamespace(ValueError):
# class InvalidNamespace(KeyError):
# class NamespaceAliasRegistrationError(Exception):
# class Message(object):
# class NamespaceMap(object):
#     def __init__(self, *args, **kwargs):
#     def __str__(self):
# def registerNamespaceAlias(namespace_uri, alias):
#     def __init__(self, openid_namespace=None, implicit_namespace=None):
#     def fromPostArgs(cls, args):
#     def fromOpenIDArgs(cls, openid_args):
#     def _fromOpenIDArgs(cls, openid_args):
#     def _getDefaultNamespace(self, mystery_alias):
#     def _setOpenIDNamespace(self, openid_ns_uri, implicit):
#     def setOpenIDNamespace(self, openid_ns_uri, implicit):
#     def getOpenIDNamespace(self):
#     def isOpenID1(self):
#     def isOpenID2(self):
#     def fromKVForm(cls, kvform_string):
#     def copy(self):
#     def toPostArgs(self):
#     def toArgs(self):
#     def toFormMarkup(self, action_url, form_tag_attrs=None,
#                      submit_text="Continue"):
#     def toURL(self, base_url):
#     def toKVForm(self):
#     def toURLEncoded(self):
#     def _fixNS(self, namespace):
#     def hasKey(self, namespace, ns_key):
#     def getKey(self, namespace, ns_key):
#     def getArg(self, namespace, key, default=None):
#     def getArgs(self, namespace):
#     def updateArgs(self, namespace, updates):
#     def setArg(self, namespace, key, value):
#     def delArg(self, namespace, key):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def getAliasedArg(self, aliased_key, default=None):
#     def __init__(self):
#     def getAlias(self, namespace_uri):
#     def getNamespaceURI(self, alias):
#     def iterNamespaceURIs(self):
#     def iterAliases(self):
#     def items(self):
#     def iteritems(self):
#     def addAlias(self, namespace_uri, desired_alias, implicit=False):
#     def add(self, namespace_uri):
#     def isDefined(self, namespace_uri):
#     def __contains__(self, namespace_uri):
#     def isImplicit(self, namespace_uri):


# Path: openid/test/test_extension.py
import unittest
from openid import extension, message

from __future__ import unicode_literals




class DummyExtension(extension.Extension):
    ns_uri = 'http://an.extension/'
    ns_alias = 'dummy'

    def getExtensionArgs(self):
        return {}


class ToMessageTest(unittest.TestCase):
    def test_OpenID1(self):

        oid1_msg = message.Message(message.OPENID1_NS)