コード例 #1
0
 def test_execute_bug(self):
     bug = self.factory.makeBug()
     login_person(bug.owner)
     command = InformationTypeEmailCommand('informationtype',
                                           ['privatesecurity'])
     exec_bug, event = command.execute(bug, None)
     self.assertEqual(bug, exec_bug)
     self.assertEqual(InformationType.PRIVATESECURITY, bug.information_type)
     self.assertTrue(IObjectModifiedEvent.providedBy(event))
コード例 #2
0
 def test_execute_bug(self):
     bug = self.factory.makeBug()
     login_person(bug.owner)
     command = InformationTypeEmailCommand(
         'informationtype', ['privatesecurity'])
     exec_bug, event = command.execute(bug, None)
     self.assertEqual(bug, exec_bug)
     self.assertEqual(
         InformationType.PRIVATESECURITY, bug.information_type)
     self.assertTrue(IObjectModifiedEvent.providedBy(event))
コード例 #3
0
 def test_execute_bug_params(self):
     user = self.factory.makePerson()
     login_person(user)
     bug_params = CreateBugParams(title='bug title', owner=user)
     command = InformationTypeEmailCommand('informationtype',
                                           ['publicsecurity'])
     dummy_event = object()
     params, event = command.execute(bug_params, dummy_event)
     self.assertEqual(bug_params, params)
     self.assertEqual(InformationType.PUBLICSECURITY,
                      bug_params.information_type)
     self.assertTrue(IObjectModifiedEvent.providedBy(event))
コード例 #4
0
 def test_execute_bug_params(self):
     user = self.factory.makePerson()
     login_person(user)
     bug_params = CreateBugParams(title='bug title', owner=user)
     command = InformationTypeEmailCommand(
         'informationtype', ['publicsecurity'])
     dummy_event = object()
     params, event = command.execute(bug_params, dummy_event)
     self.assertEqual(bug_params, params)
     self.assertEqual(
         InformationType.PUBLICSECURITY, bug_params.information_type)
     self.assertTrue(IObjectModifiedEvent.providedBy(event))