Пример #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='[email protected]')
     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)
Пример #2
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))