'Single-part messages have an implicit first part which clients
should be able to retrieve explicitly.  Test that a client
requesting part 1 of a text/plain message receives the body of the
text/plain part.'

def test_fetchBodyPartOfNonMultipart(self):

    self.function = self.client.fetchSpecific
    self.messages = '1'
    parts = [1]
    outerBody = 'DA    body'
    headers = OrderedDict()
    headers['from'] = 'sender@host'
    headers['to'] = 'recipient@domain'
    headers['subject'] = 'booga    booga    boo'
    headers['content-type'] = 'text/plain'
    self.msgObjs = [FakeyMessage(headers, (), None, outerBody, 123, None)]
    self.expected = {0: [['BODY', ['1'], 'DA    body']]}
    def result(R):
        self.result = R
    self.connected.addCallback((lambda _: self.function(self.messages, headerNumber=parts)))
    self.connected.addCallback(result)
    self.connected.addCallback(self._cbStopClient)
    self.connected.addErrback(self._ebGeneral)
    d = loopback.loopbackTCP(self.server, self.client, noisy=False)
    d.addCallback((lambda ign: self.assertEqual(self.result, self.expected)))
    return d
