def test_getAlternatePartBodyAltMixed(self): """ Test that the parts returned from L{xquotient.exmess.MessageBodyFragment.getAlternatePartBody} are of the type C{text/html} and C{text/plain}, in that order, when asked for C{text/html} part bodies from L{altInsideMixed} """ self.setUpMailStuff() m = self.createMIMEReceiver().feedStringNow( self.altInsideMixed).message messageBody = MessageBodyFragment(m, 'text/plain') messageBody = messageBody.getAlternatePartBody('text/html') self.assertEqual(list(p.type for p in messageBody.parts), ['text/html', 'text/plain'])
def test_getAlternatePartBodyAltMixed(self): """ Test that the parts returned from L{xquotient.exmess.MessageBodyFragment.getAlternatePartBody} are of the type C{text/html} and C{text/plain}, in that order, when asked for C{text/html} part bodies from L{altInsideMixed} """ self.setUpMailStuff() m = self.createMIMEReceiver().feedStringNow( self.altInsideMixed).message messageBody = MessageBodyFragment(m, 'text/plain') messageBody = messageBody.getAlternatePartBody('text/html') self.assertEqual( list(p.type for p in messageBody.parts), ['text/html', 'text/plain'])