'Testing iq/pubsub/affiliations/affiliation stanzas'

def testAffiliations(self):

    iq = self.Iq()
    aff1 = pubsub.Affiliation()
    aff1['node'] = 'testnode'
    aff1['affiliation'] = 'owner'
    aff2 = pubsub.Affiliation()
    aff2['node'] = 'testnode2'
    aff2['affiliation'] = 'publisher'
    iq['pubsub']['affiliations'].append(aff1)
    iq['pubsub']['affiliations'].append(aff2)
    self.check(iq, '\n                                        <iq    id="0">\n                                                <pubsub    xmlns="http://jabber.org/protocol/pubsub">\n                                                        <affiliations>\n                                                                <affiliation    node="testnode"    affiliation="owner"    />\n                                                                <affiliation    node="testnode2"    affiliation="publisher"    />\n                                                        </affiliations>\n                                                </pubsub>\n                                        </iq>')
