示例#1
0
 def test_is_newcomer_issue(self):
     mock_iss = create_autospec(IGitt.GitHub.GitHubIssue)
     mock_iss.labels = PropertyMock()
     mock_iss.labels = ('difficulty/newcomer', )
     self.assertTrue(LabHub.is_newcomer_issue(mock_iss))
     mock_iss.labels = ('difficulty/medium', )
     self.assertFalse(LabHub.is_newcomer_issue(mock_iss))
示例#2
0
 def test_is_room_member(self):
     msg = create_autospec(Message)
     msg.frm.room.occupants = PropertyMock()
     msg.frm.room.occupants = ['batman', 'superman']
     self.assertTrue(LabHub.is_room_member('batman', msg))