Project

General

Profile

Bug #2003

d1_common_python not passing tests

Added by Dave Vieglais over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
d1_common_python
Target version:
Start date:
2011-11-06
Due date:
% Done:

100%

Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:

Description

d1_common_python is not passing unit tests.

........EFE..E.................E............

ERROR: test_serialization_gmn (test_exceptions.TestExceptions)

Deserialize: XML -> Checksum (GMN)

Traceback (most recent call last):
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/tests/test_exceptions.py", line 133, in test_serialization_gmn
self.deserialize_and_check(EG_ERROR_GMN)
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/tests/test_exceptions.py", line 81, in deserialize_and_check
obj = dataoneTypes.CreateFromDocument(doc[0])
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/d1_common/types/generated/dataoneTypes.py", line 31, in CreateFromDocument
saxer.parse(StringIO.StringIO(xml_text))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self.parser.Parse(data, isFinal)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 338, in start_element_ns
AttributesNSImpl(newattrs, qnames))
File "/Library/Python/2.7/site-packages/pyxb/binding/saxer.py", line 297, in startElementNS
element_binding = name_en.elementBinding()
File "/Library/Python/2.7/site-packages/pyxb/namespace/
init.py", line 96, in __getattr_
category_value = self.namespace().categoryMap(name).get(self.localName())
File "/Library/Python/2.7/site-packages/pyxb/namespace/init.py", line 293, in categoryMap
raise pyxb.NamespaceError(self, '%s has no category %s' % (self, category))
NamespaceError: http://ns.dataone.org/service/types/exceptions has no category elementBinding

======================================================================

ERROR: test_correct_mmp_generation (test_mime_multipart.TestMimeMultipart)

Traceback (most recent call last):
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/tests/test_mime_multipart.py", line 242, in test_correct_mmp_generation
self.assertEquals(mmp.read(), mmp_doc)
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/d1_common/mime_multipart.py", line 128, in read
for s in self:
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/d1_common/mime_multipart.py", line 191, in next
data = self._file_chunk()
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/d1_common/mime_multipart.py", line 283, in _file_chunk
return val.read(self.chunk_size)
AttributeError: 'unicode' object has no attribute 'read'

======================================================================
ERROR: test_serialization_gmn (test_nodelist.TestNodeList)

Deserialize: XML -> NodeList (GMN)

Traceback (most recent call last):
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/tests/test_nodelist.py", line 262, in test_serialization_gmn
self.deserialize_and_check(EG_NODELIST_GMN)
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/tests/test_nodelist.py", line 253, in deserialize_and_check
obj = dataoneTypes.CreateFromDocument(doc)
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/d1_common/types/generated/dataoneTypes.py", line 31, in CreateFromDocument
saxer.parse(StringIO.StringIO(xml_text))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self.parser.Parse(data, isFinal)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Library/Python/2.7/site-packages/pyxb/binding/saxer.py", line 360, in endElementNS
binding_object = this_state.endBindingElement()
File "/Library/Python/2.7/site-packages/pyxb/binding/saxer.py", line 219, in endBindingElement
self.
_bindingObject.validateBinding()
File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line 396, in validateBinding
self._validateBinding_vx()
File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line 1802, in _validateBinding_vx
raise pyxb.BindingValidationError('Unable to match content to binding model')
BindingValidationError: Unable to match content to binding model

======================================================================

ERROR: testLoadSystemMetadata (test_systemmetadata.TestSystemMetadata)

Traceback (most recent call last):
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/tests/test_systemmetadata.py", line 155, in testLoadSystemMetadata
sysm = dataoneTypes.CreateFromDocument(EG_SYSMETA)
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/d1_common/types/generated/dataoneTypes.py", line 31, in CreateFromDocument
saxer.parse(StringIO.StringIO(xml_text))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 207, in feed
self.parser.Parse(data, isFinal)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/sax/expatreader.py", line 349, in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Library/Python/2.7/site-packages/pyxb/binding/saxer.py", line 360, in endElementNS
binding_object = this_state.endBindingElement()
File "/Library/Python/2.7/site-packages/pyxb/binding/saxer.py", line 213, in endBindingElement
self.
bindingObject.append(content, element_use, maybe_element, require_validation=pyxb._ParsingRequiresValid)
File "/Library/Python/2.7/site-packages/pyxb/binding/basis.py", line 2048, in append
( consumed, underflow_exc ) = self.
modelState.step(self, value, element_use)
File "/Library/Python/2.7/site-packages/pyxb/binding/content.py", line 975, in step
consumed = self.
_termState.accepts(self, instance, value, element_use)
File "/Library/Python/2.7/site-packages/pyxb/binding/content.py", line 776, in accepts
raise underflow_exc
UnrecognizedContentError: UnrecognizedContentError: too few

======================================================================
FAIL: test_xml_round_trip (test_exceptions.TestExceptions)

Test serialization and deserialization of DataONE Exceptions

Traceback (most recent call last):
File "/Users/vieglais/Workspaces/DataONE_trunk/d1_common_python/src/tests/test_exceptions.py", line 111, in test_xml_round_trip
self.assertEqual(root.tagName, u'ns1:error')
AssertionError: u'error' != u'ns1:error'
- error
+ ns1:error
? ++++

History

#1 Updated by Dave Vieglais over 12 years ago

  • Target version changed from Sprint-2011.44-Block.6 to Sprint-2011.45-Block.6
  • Position set to 1

#2 Updated by Roger Dahl over 12 years ago

  • Status changed from New to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)