def test_processWithMergeDirectiveEmail(self): """process errors if merge@ address used.""" message = self.factory.makeSignedMessage() file_alias = self.factory.makeLibraryFileAlias( content=message.as_string()) # mail.incoming.handleMail also explicitly does this. switch_dbuser(config.processmail.dbuser) code_handler = CodeHandler() code_handler.process(message, '*****@*****.**', file_alias) notification = pop_notifications()[0] self.assertEqual( 'Merge directive not supported.', notification['Subject'])
def setUp(self): super(TestCodeHandler, self).setUp(user='******') self.code_handler = CodeHandler() self._old_policy = setSecurityPolicy(LaunchpadSecurityPolicy)