'Test setting a normal subinterface when a default language is set'

def testDefaultLang(self):

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