Ignore:
Timestamp:
Jan 10, 2010, 12:43:48 PM (13 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Message:

Don't set an explicit namespace on wokkel.pubsub.Item.

Before this change, wokkel.pubsub.Item could not be used for constructing
notifications, as those are in another namespace. This makes sure that items
will always have the correct namespace, inherited from their ancestors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/test/test_pubsub.py

    r84 r86  
    437437        child = children[0]
    438438        self.assertEquals('test', child['node'])
    439         items = list(domish.generateElementsQNamed(child.children,
    440                                                    'item', NS_PUBSUB))
     439
     440        items = []
     441        for element in child.elements():
     442            if element.name == 'item' and element.uri in (NS_PUBSUB, None):
     443                items.append(element)
     444
    441445        self.assertEquals(1, len(items))
    442446        self.assertIdentical(item, items[0])
     
    29072911            self.assertTrue(domish.IElement.providedBy(item))
    29082912            self.assertEqual('item', item.name)
    2909             self.assertEqual(NS_PUBSUB, item.uri)
     2913            self.assertIn(item.uri, (NS_PUBSUB, None))
    29102914            self.assertEqual('current', item['id'])
    29112915
Note: See TracChangeset for help on using the changeset viewer.