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))
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))