Exemplo n.º 1
0
 def test_get_owners_everyone(self):
     self.create_ownership(self.project, [], True)
     event = self.create_event(self.project)
     recipients = get_owners(project=self.project, event=event)
     self.assert_recipients(
         expected=[self.user_1, self.user_2, self.user_3], received=recipients
     )
Exemplo n.º 2
0
 def test_get_owners_match(self):
     with self.feature("organizations:notification-all-recipients"):
         self.create_ownership(self.project, [self.rule_1, self.rule_2, self.rule_3])
         event = self.create_event(self.project)
         recipients = get_owners(project=self.project, event=event)
         self.assert_recipients(
             expected=[self.team_1, self.team_2, self.user_1], received=recipients
         )
Exemplo n.º 3
0
 def test_get_owners_match_ignores_fallthrough(self):
     self.create_ownership(self.project, [self.rule_1, self.rule_2, self.rule_3], True)
     event_2 = self.create_event(self.project)
     recipients_2 = get_owners(project=self.project, event=event_2)
     self.assert_recipients(expected=[self.user_1], received=recipients_2)
Exemplo n.º 4
0
 def test_get_owners_single_participant(self):
     self.create_ownership(self.project, [self.rule_1, self.rule_2, self.rule_3])
     event = self.create_event(self.project)
     recipients = get_owners(project=self.project, event=event)
     self.assert_recipients(expected=[self.user_1], received=recipients)
Exemplo n.º 5
0
 def test_get_owners_empty(self):
     self.create_ownership(self.project)
     event = self.create_event(self.project)
     recipients = get_owners(project=self.project, event=event)
     self.assert_recipients(expected=[], received=recipients)
Exemplo n.º 6
0
 def test_get_owners_no_event(self):
     self.create_ownership(self.project)
     recipients = get_owners(project=self.project)
     self.assert_recipients(
         expected=[self.user_1, self.user_2, self.user_3], received=recipients
     )