# Path: rwslib/rwsobjects.py
# MEDI_NS = "{http://www.mdsol.com/ns/odm/metadata}"
# ODM_NS = "{http://www.cdisc.org/ns/odm/v1.3}"
# XLINK_NS = "{http://www.w3.org/1999/xlink}"
#     STATUS_PROPERTIES = [
#         "Overdue",
#         "Touched",
#         "Empty",
#         "Incomplete",
#         "NonConformant",
#         "RequiresSecondPass",
#         "RequiresReconciliation",
#         "RequiresVerification",
#         "Verified",
#         "Frozen",
#         "Locked",
#         "RequiresReview",
#         "PendingReview",
#         "Reviewed",
#         "RequiresAnswerQuery",
#         "RequiresPendingCloseQuery",
#         "RequiresCloseQuery",
#         "StickyPlaced",
#         "Signed",
#         "SignatureCurrent",
#         "RequiresTranslation",
#         "RequiresCoding",
#         "RequiresPendingAnswerQuery",
#         "RequiresSignature",
#         "ReadyForFreeze",
#         "ReadyForLock",
#         "SubjectKeyType",
#         "SubjectName",
#     ]
# def getEnvironmentFromNameAndProtocol(studyname, protocolname):
# def parseXMLString(xml):
#     def __init__(self, msg, rws_error):
#     def __init__(self, xml):
#     def __unicode__(self):
#     def __str__(self):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(
#         self,
#         oid=None,
#         studyname=None,
#         protocolname=None,
#         environment=None,
#         projecttype=None,
#     ):
#     def isProd(self):
#     def fromElement(cls, elem):
#     def __init__(self, xml):
#     def __init__(self):
#     def fromElement(cls, elem):
#     def __init__(self, xml):
#     def __init__(self):
#     def subject_name(self):
#     def fromElement(cls, elem):
#     def __init__(self, xml):
# class RWSException(Exception):
# class XMLRepr(object):
# class ODMDoc(XMLRepr):
# class RWSError(ODMDoc):
# class RWSErrorResponse(XMLRepr):
# class RWSResponse(XMLRepr):
# class RWSPostResponse(RWSResponse):
# class RWSPostErrorResponse(RWSErrorResponse):
# class RWSStudyListItem(object):
# class RWSStudies(list, ODMDoc):
# class MetaDataVersion(object):
# class RWSStudyMetadataVersions(list, ODMDoc, RWSStudyListItem):
# class RWSSubjectListItem(object):
# class RWSSubjects(list, ODMDoc):


import unittest
from rwslib import rwsobjects
# -*- coding: utf-8 -*-
__author__ = "isparks"




class TestParse(unittest.TestCase):
    def test_parse_with_bom(self):
        """Test parser can throw away BOM"""
        text = u"""\xef\xbb\xbf<?xml version="1.0" encoding="utf-8"?><ODM/>"""

# Path: rwslib/rwsobjects.py
# MEDI_NS = "{http://www.mdsol.com/ns/odm/metadata}"
# ODM_NS = "{http://www.cdisc.org/ns/odm/v1.3}"
# XLINK_NS = "{http://www.w3.org/1999/xlink}"
#     STATUS_PROPERTIES = [
#         "Overdue",
#         "Touched",
#         "Empty",
#         "Incomplete",
#         "NonConformant",
#         "RequiresSecondPass",
#         "RequiresReconciliation",
#         "RequiresVerification",
#         "Verified",
#         "Frozen",
#         "Locked",
#         "RequiresReview",
#         "PendingReview",
#         "Reviewed",
#         "RequiresAnswerQuery",
#         "RequiresPendingCloseQuery",
#         "RequiresCloseQuery",
#         "StickyPlaced",
#         "Signed",
#         "SignatureCurrent",
#         "RequiresTranslation",
#         "RequiresCoding",
#         "RequiresPendingAnswerQuery",
#         "RequiresSignature",
#         "ReadyForFreeze",
#         "ReadyForLock",
#         "SubjectKeyType",
#         "SubjectName",
#     ]
# def getEnvironmentFromNameAndProtocol(studyname, protocolname):
# def parseXMLString(xml):
#     def __init__(self, msg, rws_error):
#     def __init__(self, xml):
#     def __unicode__(self):
#     def __str__(self):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(self, xml):
#     def __init__(
#         self,
#         oid=None,
#         studyname=None,
#         protocolname=None,
#         environment=None,
#         projecttype=None,
#     ):
#     def isProd(self):
#     def fromElement(cls, elem):
#     def __init__(self, xml):
#     def __init__(self):
#     def fromElement(cls, elem):
#     def __init__(self, xml):
#     def __init__(self):
#     def subject_name(self):
#     def fromElement(cls, elem):
#     def __init__(self, xml):
# class RWSException(Exception):
# class XMLRepr(object):
# class ODMDoc(XMLRepr):
# class RWSError(ODMDoc):
# class RWSErrorResponse(XMLRepr):
# class RWSResponse(XMLRepr):
# class RWSPostResponse(RWSResponse):
# class RWSPostErrorResponse(RWSErrorResponse):
# class RWSStudyListItem(object):
# class RWSStudies(list, ODMDoc):
# class MetaDataVersion(object):
# class RWSStudyMetadataVersions(list, ODMDoc, RWSStudyListItem):
# class RWSSubjectListItem(object):
# class RWSSubjects(list, ODMDoc):


# Path: rwslib/tests/test_rwsobjects.py
import unittest
from rwslib import rwsobjects

# -*- coding: utf-8 -*-
__author__ = "isparks"




class TestParse(unittest.TestCase):
    def test_parse_with_bom(self):
        """Test parser can throw away BOM"""
        text = u"""\xef\xbb\xbf<?xml version="1.0" encoding="utf-8"?><ODM/>"""

        self.assertEqual("ODM", rwsobjects.parseXMLString(text).tag)