/usr/lib/python2.6/site-packages/keystoneauth1/tests/unit
Edit: /usr/lib/python2.6/site-packages/keystoneauth1/tests/unit/matchers.pyc (3906B)
Ñò
7
Wc @ sS d d k l Z d d k l Z d e f d „ ƒ YZ d e i f d „ ƒ YZ d S( iÿÿÿÿ( t etree( t matcherst XMLEqualsc B s) e Z d Z d „ Z d „ Z d „ Z RS( sE Parses two XML documents from strings and compares the results.
c C s
| | _ d S( N( t expected( t selfR ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt __init__ s c C s d | i i | i f S( Ns %s(%r)( t __class__t __name__R ( R ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt __str__ s c sy ‡ f d † ‰ t i d t ƒ } t i | i i ƒ | ƒ } t i | i ƒ | ƒ } ˆ | | ƒ o d St | i | ƒ S( Nc s¨ | i | i j o t S| i | i j o t Sd „ } | | ƒ } | | ƒ } t | ƒ t | ƒ j o t Sx2 t | | ƒ D]! \ } } ˆ | | ƒ p t Sq Wt S( s Tests whether two XML documents are equivalent.
This is a recursive algorithm that operates on each element in
the hierarchy. Siblings are sorted before being checked to
account for two semantically equivalent documents where siblings
appear in different document order.
The sorting algorithm is a little weak in that it could fail for
documents where siblings at a given level are the same, but have
different children.
c S s t | i ƒ d d „ ƒS( Nt keyc S s | i S( ( t tag( t el( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt
3 s ( t sortedt getchildren( t doc( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt _sorted_children2 s ( R
t Falset attribt lent zipt True( t expected_doct observed_docR t expected_childrent observed_childrent expected_elt observed_el( t xml_element_equals( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyR s
t remove_blank_text( R t XMLParserR t
fromstringR t stript XMLMismatch( R t othert parserR R ( ( R sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt match s #( R t
__module__t __doc__R R R$ ( ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyR s R! c B s e Z d „ Z d „ Z RS( c C s | | _ | | _ d S( N( R R" ( R R R" ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyR N s c C s) d „ } d | | i ƒ | | i ƒ f S( Nc S sL t i d t ƒ } t i | i ƒ | ƒ } t i | d d d t ƒi d ƒ S( NR t encodings utf-8t pretty_print( R R R R R t tostringt decode( t xmlR# R ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt
pretty_xmlS s s expected =
%s
actual =
%s( R R" ( R R, ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt describeR s ( R R% R R- ( ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyR! L s N( t lxmlR t testtoolsR t objectR t MismatchR! ( ( ( sH /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/tests/unit/matchers.pyt s 9