# Path: oaxmlapi/commands.py
# class Time(_Base):
# class Read(_Base):
#     class Filter(object):
# class Report(_Base):
# class Add(_Base):
# class Delete(_Base):
# class Modify(_Base):
# class ModifyOnCondition(_Base):
# class Submit(_Base):
# class CreateAccount(_Base):
# class CreateUser(_Base):
# class Switch(_Base):
# class MakeURL(_Base):
#     def __init__(self):
#     def __str__(self):
#     def time(self):
#     def _main(self):
#     def __init__(self, type, method, attribs, filters=None, orderby=None, fields=None):
#     def __str__(self):
#     def method(self):
#     def method(self, m):
#     def read(self):
#     def _main(self):
#         def __init__(self, filter, fieldname, datatype):
#         def __str__(self):
#         def getFilter(self):
#     def __init__(self, type, datatype):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def getReport(self):
#     def _main(self):
#     def __init__(self, type, attribs, datatype):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def add(self):
#     def _main(self):
#     def __init__(self, type, datatype):
#     def __str__(self):
#     def delete(self):
#     def _main(self):
#     def __init__(self, type, attribs, datatype):
#     def __str__(self):
#     def modify(self):
#     def _main(self):
#     def __init__(self, type, datatype1, datatype2):
#     def __str__(self):
#     def modify(self):
#     def _main(self):
#     def __init__(self, type, datatype, approval):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def submit(self):
#     def _main(self):
#     def __init__(self, company, user):
#     def __str__(self):
#     def company(self):
#     def company(self, c):
#     def user(self):
#     def user(self, u):
#     def create(self):
#     def _main(self):
#     def __init__(self, company, user):
#     def __str__(self):
#     def company(self):
#     def company(self, c):
#     def user(self):
#     def user(self, u):
#     def create(self):
#     def _main(self):
#     def __init__(self, type, datatype):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def switch(self):
#     def _main(self):
#     def __init__(self, uid, page, app, arg):
#     def __str__(self):
#     def page(self):
#     def page(self, p):
#     def app(self):
#     def app(self, a):
#     def makeurl(self):
#     def _main(self):
# 
# Path: oaxmlapi/datatypes.py
# class Datatype(_Base):
#     def __init__(self, type, fields):
#     def __str__(self):
#     def getDatatype(self):
#     def _main(self):


import unittest
    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from oaxmlapi import commands, datatypes


class TestAddClass(unittest.TestCase):

    def test_str(self):
        project = datatypes.Datatype(
            'Project',
            {'name': 'New project'}
        )
        self.assertEqual(
            str(commands.Add('Project', {}, project)),
            '<Add type=Project>'
        )

    def test_add(self):
        project = datatypes.Datatype(
            'Project',
            {'name': 'New project'}
        )
        self.assertIsInstance(
            commands.Add('Project', {}, project).add(),
            ET.Element
        )

    def test_tostring(self):
        project = datatypes.Datatype(
            'Project',
            {'name': 'New project'}
        )
        self.assertEqual(

# Path: oaxmlapi/commands.py
# class Time(_Base):
# class Read(_Base):
#     class Filter(object):
# class Report(_Base):
# class Add(_Base):
# class Delete(_Base):
# class Modify(_Base):
# class ModifyOnCondition(_Base):
# class Submit(_Base):
# class CreateAccount(_Base):
# class CreateUser(_Base):
# class Switch(_Base):
# class MakeURL(_Base):
#     def __init__(self):
#     def __str__(self):
#     def time(self):
#     def _main(self):
#     def __init__(self, type, method, attribs, filters=None, orderby=None, fields=None):
#     def __str__(self):
#     def method(self):
#     def method(self, m):
#     def read(self):
#     def _main(self):
#         def __init__(self, filter, fieldname, datatype):
#         def __str__(self):
#         def getFilter(self):
#     def __init__(self, type, datatype):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def getReport(self):
#     def _main(self):
#     def __init__(self, type, attribs, datatype):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def add(self):
#     def _main(self):
#     def __init__(self, type, datatype):
#     def __str__(self):
#     def delete(self):
#     def _main(self):
#     def __init__(self, type, attribs, datatype):
#     def __str__(self):
#     def modify(self):
#     def _main(self):
#     def __init__(self, type, datatype1, datatype2):
#     def __str__(self):
#     def modify(self):
#     def _main(self):
#     def __init__(self, type, datatype, approval):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def submit(self):
#     def _main(self):
#     def __init__(self, company, user):
#     def __str__(self):
#     def company(self):
#     def company(self, c):
#     def user(self):
#     def user(self, u):
#     def create(self):
#     def _main(self):
#     def __init__(self, company, user):
#     def __str__(self):
#     def company(self):
#     def company(self, c):
#     def user(self):
#     def user(self, u):
#     def create(self):
#     def _main(self):
#     def __init__(self, type, datatype):
#     def __str__(self):
#     def type(self):
#     def type(self, t):
#     def switch(self):
#     def _main(self):
#     def __init__(self, uid, page, app, arg):
#     def __str__(self):
#     def page(self):
#     def page(self, p):
#     def app(self):
#     def app(self, a):
#     def makeurl(self):
#     def _main(self):
# 
# Path: oaxmlapi/datatypes.py
# class Datatype(_Base):
#     def __init__(self, type, fields):
#     def __str__(self):
#     def getDatatype(self):
#     def _main(self):


# Path: tests/commands/test_add.py
import unittest
    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from oaxmlapi import commands, datatypes



class TestAddClass(unittest.TestCase):

    def test_str(self):
        project = datatypes.Datatype(
            'Project',
            {'name': 'New project'}
        )
        self.assertEqual(
            str(commands.Add('Project', {}, project)),
            '<Add type=Project>'
        )

    def test_add(self):
        project = datatypes.Datatype(
            'Project',
            {'name': 'New project'}
        )
        self.assertIsInstance(
            commands.Add('Project', {}, project).add(),
            ET.Element
        )

    def test_tostring(self):
        project = datatypes.Datatype(
            'Project',
            {'name': 'New project'}
        )
        self.assertEqual(

            commands.Add('Project', {}, project).tostring(),