'Test fixing namespaces in an XPath expression.'

def testFixNs(self):

    e = ElementBase()
    ns = 'http://jabber.org/protocol/disco#items'
    result = e._fix_ns(('{%s}foo/bar/{abc}baz/{%s}more' % (ns, ns)))
    expected = '/'.join([('{%s}foo' % ns), ('{%s}bar' % ns), '{abc}baz', ('{%s}more' % ns)])
    self.failUnless((expected == result), ('Incorrect    namespace    fixing    result:    %s' % str(result)))
