# Path: oaxmlapi/connections.py
# class Application(object):
# class Auth(_Base):
# class RemoteAuth(_Base):
# class Whoami(_Base):
# class Request(_Base):
# class Error(_Base):
#     def __init__(self, client, client_version, namespace, key):
#     def __str__(self):
#     def __init__(self, company, username, password):
#     def __str__(self):
#     def auth(self):
#     def _main(self):
#     def __init__(self, company, username, password):
#     def __str__(self):
#     def remoteauth(self):
#     def _main(self):
#     def __init__(self, datatype):
#     def __str__(self):
#     def datatype(self):
#     def datatype(self, d):
#     def whoami(self):
#     def _main(self):
#     def __init__(self, application, auth, xml_data):
#     def __str__(self):
#     def request(self):
#     def _main(self):
#     def __init__(self, application, code):
#     def __str__(self):
#     def error(self):
#     def _main(self):


import unittest
    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from oaxmlapi import connections
        app = connections.Application('test', '1.0', 'default', 'abc123')
        error = connections.Error(app, '201')
        self.assertEqual(
            str(connections.Error(app, '201')),
            '<Error code=201>'
        )

    def test_error(self):
        app = connections.Application('test', '1.0', 'default', 'abc123')
        self.assertIsInstance(
            connections.Error(app, '201').error(),
            ET.Element
        )

    def test_tostring(self):
        app = connections.Application('test', '1.0', 'default', 'abc123')
        self.assertEqual(
            connections.Error(app, '201').tostring(),
            (
                b'<?xml version="1.0" encoding="utf-8"?>'
                b'<request API_ver="1.0" client="test" client_ver="1.0" '
                b'key="abc123" namespace="default"><Read method="equal to" '
                b'type="Error"><Error><code>201</code></Error></Read>'
                b'</request>'
            )
        )

    def test_prettify(self):
        app = connections.Application('test', '1.0', 'default', 'abc123')
        self.assertEqual(

# Path: oaxmlapi/connections.py
# class Application(object):
# class Auth(_Base):
# class RemoteAuth(_Base):
# class Whoami(_Base):
# class Request(_Base):
# class Error(_Base):
#     def __init__(self, client, client_version, namespace, key):
#     def __str__(self):
#     def __init__(self, company, username, password):
#     def __str__(self):
#     def auth(self):
#     def _main(self):
#     def __init__(self, company, username, password):
#     def __str__(self):
#     def remoteauth(self):
#     def _main(self):
#     def __init__(self, datatype):
#     def __str__(self):
#     def datatype(self):
#     def datatype(self, d):
#     def whoami(self):
#     def _main(self):
#     def __init__(self, application, auth, xml_data):
#     def __str__(self):
#     def request(self):
#     def _main(self):
#     def __init__(self, application, code):
#     def __str__(self):
#     def error(self):
#     def _main(self):


# Path: tests/connections/test_error.py
import unittest
    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from oaxmlapi import connections

        app = connections.Application('test', '1.0', 'default', 'abc123')
        error = connections.Error(app, '201')
        self.assertEqual(
            str(connections.Error(app, '201')),
            '<Error code=201>'
        )

    def test_error(self):
        app = connections.Application('test', '1.0', 'default', 'abc123')
        self.assertIsInstance(
            connections.Error(app, '201').error(),
            ET.Element
        )

    def test_tostring(self):
        app = connections.Application('test', '1.0', 'default', 'abc123')
        self.assertEqual(
            connections.Error(app, '201').tostring(),
            (
                b'<?xml version="1.0" encoding="utf-8"?>'
                b'<request API_ver="1.0" client="test" client_ver="1.0" '
                b'key="abc123" namespace="default"><Read method="equal to" '
                b'type="Error"><Error><code>201</code></Error></Read>'
                b'</request>'
            )
        )

    def test_prettify(self):
        app = connections.Application('test', '1.0', 'default', 'abc123')
        self.assertEqual(

            connections.Error(app, '201').prettify(),