Пример #1
0
 def test_it_does_not_fail_on_matching_state(
     assert_github_issue_no_cache: AssertGitHubIssue,
     requests_mock: MagicMock,
     expected_state: GitHubIssueState,
     returned_state: str,
 ):
     set_issue_state(requests_mock, returned_state)
     assert_github_issue_no_cache.is_state(ISSUE_NUMBER, expected_state)
Пример #2
0
    def test_it_fails_on_non_matching_state(
        assert_github_issue_no_cache: AssertGitHubIssue,
        requests_mock: MagicMock,
        expected_state: GitHubIssueState,
        returned_state: str,
    ):
        set_issue_state(requests_mock, returned_state)

        with pytest.raises(AssertionError):
            assert_github_issue_no_cache.is_state(ISSUE_NUMBER, expected_state)