'Test deleting interfaces with a default lang set.'

def testDelInterfacesWithDefaultLang(self):

    class TestStanza(ElementBase, ):
        name = 'foo'
        namespace = 'test'
        interfaces = set(['test'])
        sub_interfaces = interfaces
        lang_interfaces = interfaces
    stanza = TestStanza()
    stanza['lang'] = 'en'
    stanza['test'] = 'hi'
    stanza['test|no'] = 'hej'
    stanza['test|fr'] = 'bonjour'
    self.check(stanza, '\n                                        <foo    xmlns="test"    xml:lang="en">\n                                                <test>hi</test>\n                                                <test    xml:lang="no">hej</test>\n                                                <test    xml:lang="fr">bonjour</test>\n                                        </foo>\n                                ')
    del stanza['test']
    self.check(stanza, '\n                                        <foo    xmlns="test"    xml:lang="en">\n                                                <test    xml:lang="no">hej</test>\n                                                <test    xml:lang="fr">bonjour</test>\n                                        </foo>\n                                ')
    del stanza['test|no']
    self.check(stanza, '\n                                        <foo    xmlns="test"    xml:lang="en">\n                                                <test    xml:lang="fr">bonjour</test>\n                                        </foo>\n                                ')
