~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/mail/tests/test_codehandler.py

mergeĀ fromĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        """When a non-existant address is supplied, it returns False."""
184
184
        mail = self.factory.makeSignedMessage('<my-id>')
185
185
        self.switchDbUser(config.processmail.dbuser)
186
 
        self.assertFalse(self.code_handler.process(mail,
 
186
        self.assertTrue(self.code_handler.process(mail,
187
187
            'mp+0@code.launchpad.dev', None))
 
188
        notification = pop_notifications()[0]
 
189
        self.assertEqual('Submit Request Failure', notification['subject'])
 
190
        # The returned message is a multipart message, the first part is
 
191
        # the message, and the second is the original message.
 
192
        message, original = notification.get_payload()
 
193
        self.assertIn(
 
194
            "There is no merge proposal at mp+0@code.launchpad.dev\n",
 
195
            message.get_payload(decode=True))
188
196
 
189
197
    def test_processBadVote(self):
190
198
        """process handles bad votes properly."""