Esempio n. 1
0
 def test_execute_bug_id_new(self):
     user = self.factory.makePerson()
     login_person(user)
     message = self.factory.makeSignedMessage(
         body='borked\n affects fnord',
         subject='title borked',
         to_address='*****@*****.**')
     filealias = self.factory.makeLibraryFileAlias()
     command = BugEmailCommand('bug', ['new'])
     params, event = command.execute(message, filealias)
     self.assertEqual(None, event)
     self.assertEqual(user, params.owner)
     self.assertEqual('title borked', params.title)
     self.assertEqual(message['Message-Id'], params.msg.rfc822msgid)
 def test_execute_bug_id_new(self):
     user = self.factory.makePerson()
     login_person(user)
     message = self.factory.makeSignedMessage(
         body='borked\n affects fnord',
         subject='title borked',
         to_address='*****@*****.**')
     filealias = self.factory.makeLibraryFileAlias()
     command = BugEmailCommand('bug', ['new'])
     params, event = command.execute(message, filealias)
     self.assertEqual(None, event)
     self.assertEqual(user, params.owner)
     self.assertEqual('title borked', params.title)
     self.assertEqual(message['Message-Id'], params.msg.rfc822msgid)
Esempio n. 3
0
 def test_execute_bug_id(self):
     bug = self.factory.makeBug()
     command = BugEmailCommand('bug', [str(bug.id)])
     self.assertEqual((bug, None), command.execute(None, None))
 def test_execute_bug_id(self):
     bug = self.factory.makeBug()
     command = BugEmailCommand('bug', [str(bug.id)])
     self.assertEqual((bug, None), command.execute(None, None))