Пример #1
0
    def test_gets_dependency_state_as_open_when_issue_is_closed_but_has_not_been_released(
            self, mock_request):
        request_response = Mock()
        request_response.status_code = HTTP_200_OK
        issue_detail = ISSUE_DETAIL.replace("ISSUE_STATUS", "closed")
        request_response.text = issue_detail

        mock_request.return_value = request_response

        issue_state = get_dependency_state("1", "foo", "bar")

        assert "closed_not_released" == issue_state
Пример #2
0
    def test_gets_dependency_state_as_closed_when_issue_is_closed_and_has_been_released(
            self, mock_request):
        request_response = Mock()
        request_response.status_code = HTTP_200_OK
        issue_detail = ISSUE_DETAIL.replace("ISSUE_STATUS", "closed")
        issue_detail = issue_detail.replace("LABEL_NAME", "RELEASED")
        request_response.text = issue_detail

        mock_request.return_value = request_response

        issue_state = get_dependency_state("1", "foo", "bar")

        self.assertEqual("closed", issue_state)