'Test resetting an interface when no default lang is used.'

def testModifyLangInterfaceWithNoDefault(self):

    class TestStanza(ElementBase, ):
        name = 'foo'
        namespace = 'test'
        interfaces = set(['test'])
        sub_interfaces = interfaces
        lang_interfaces = interfaces
    stanza = TestStanza()
    stanza['test'] = 'hola'
    stanza['test|en'] = 'hi'
    self.check(stanza, '\n                                        <foo    xmlns="test">\n                                                <test>hola</test>\n                                                <test    xml:lang="en">hi</test>\n                                        </foo>\n                                ')
    stanza['test'] = 'adios'
    stanza['test|en'] = 'bye'
    self.check(stanza, '\n                                        <foo    xmlns="test">\n                                                <test>adios</test>\n                                                <test    xml:lang="en">bye</test>\n                                        </foo>\n                                ')
    self.assertEqual(stanza['test'], 'adios', ('Incorrect    subinterface    value:    %s' % stanza['test']))
    self.assertEqual(stanza['test'], 'adios', ('Incorrect    subinterface    value:    %s' % stanza['test|es']))
    self.assertEqual(stanza['test|en'], 'bye', ('Incorrect    subinterface    value:    %s' % stanza['test|en']))
