Package lxml :: Package tests :: Module test_objectify
[hide private]
[frames] | no frames]

Module test_objectify

source code

Tests specific to the lxml.objectify API

Classes [hide private]
  ObjectifyTestCase
Test cases for lxml.objectify
Functions [hide private]
 
test_suite() source code
Variables [hide private]
  PYTYPE_NAMESPACE = 'http://codespeak.net/lxml/objectify/pytype'
  XML_SCHEMA_NS = 'http://www.w3.org/2001/XMLSchema'
  XML_SCHEMA_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-ins...
  XML_SCHEMA_INSTANCE_TYPE_ATTR = '{http://www.w3.org/2001/XMLSc...
  XML_SCHEMA_NIL_ATTR = '{http://www.w3.org/2001/XMLSchema-insta...
  DEFAULT_NSMAP = {'py': '/objectify/py...
  objectclass2xsitype = {<type 'objectify.IntElement'>: ('int', ...
  xsitype2objclass = {'ENTITY': <type 'objectify.StringElement'>...
  xml_str = '<obj:root xmlns:obj="objectified" xmlns:other="othe...
Variables Details [hide private]

XML_SCHEMA_INSTANCE_NS

Value:
'http://www.w3.org/2001/XMLSchema-instance'

XML_SCHEMA_INSTANCE_TYPE_ATTR

Value:
'{http://www.w3.org/2001/XMLSchema-instance}type'

XML_SCHEMA_NIL_ATTR

Value:
'{http://www.w3.org/2001/XMLSchema-instance}nil'

DEFAULT_NSMAP

Value:
{'py': 'http://codespeak.net/lxml/objectify/pytype',
 'xsd': 'http://www.w3.org/2001/XMLSchema',
 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}

objectclass2xsitype

Value:
{<type 'objectify.IntElement'>: ('int',
                                 'short',
                                 'byte',
                                 'unsignedShort',
                                 'unsignedByte'),
 <type 'objectify.LongElement'>: ('integer',
                                  'nonPositiveInteger',
                                  'negativeInteger',
...

xsitype2objclass

Value:
{'ENTITY': <type 'objectify.StringElement'>,
 'ID': <type 'objectify.StringElement'>,
 'IDREF': <type 'objectify.StringElement'>,
 'NCName': <type 'objectify.StringElement'>,
 'NMTOKEN': <type 'objectify.StringElement'>,
 'Name': <type 'objectify.StringElement'>,
 'boolean': <type 'objectify.BoolElement'>,
 'byte': <type 'objectify.IntElement'>,
...

xml_str

Value:
'''<obj:root xmlns:obj="objectified" xmlns:other="otherNS">
  <obj:c1 a1="A1" a2="A2" other:a3="A3">
    <obj:c2>0</obj:c2>
    <obj:c2>1</obj:c2>
    <obj:c2>2</obj:c2>
    <other:c2>3</other:c2>
    <c2>3</c2>
  </obj:c1>
...