'Test deleting stanza interface values.'

def testDelItem(self):

    class TestStanza(ElementBase, ):
        name = 'foo'
        namespace = 'foo'
        interfaces = set(('bar', 'baz', 'qux'))
        sub_interfaces = set(('bar',))
        def delQux(self):
            pass
    class TestStanzaPlugin(ElementBase, ):
        name = 'foobar'
        namespace = 'foo'
        plugin_attrib = 'foobar'
        interfaces = set(('foobar',))
    register_stanza_plugin(TestStanza, TestStanzaPlugin)
    stanza = TestStanza()
    stanza['bar'] = 'a'
    stanza['baz'] = 'b'
    stanza['qux'] = 'c'
    stanza['foobar']['foobar'] = 'd'
    self.check(stanza, '\n                                        <foo    xmlns="foo"    baz="b"    qux="c">\n                                                <bar>a</bar>\n                                                <foobar    foobar="d"    />\n                                        </foo>\n                                ')
    del stanza['bar']
    del stanza['baz']
    del stanza['qux']
    del stanza['foobar']
    self.check(stanza, '\n                                        <foo    xmlns="foo"    qux="c"    />\n                                ')
