Skip to content

Commit

Permalink
🐛 Make unchanged params explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Jan 19, 2020
1 parent 0311669 commit b3c0dd9
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions tests/github/utils/event_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
)


UNCHANGED_UUID4_STR = str(uuid4())


@pytest.mark.parametrize(
'vcr_contents, vcr_headers',
(
Expand Down Expand Up @@ -230,15 +233,20 @@ def test_validate_http_headers__invalid(http_headers, error_message):
'incomplete_http_headers, expected_headers',
(
pytest.param(
*(
{
'content-type': 'application/json',
'user-agent': 'GitHub-Hookshot/dict-test',
'x-github-delivery': str(uuid4()),
'x-github-event': 'pull_request',
'x-header': 'x_value',
} * 2,
),
{
'content-type': 'application/json',
'user-agent': 'GitHub-Hookshot/dict-test',
'x-github-delivery': UNCHANGED_UUID4_STR,
'x-github-event': 'pull_request',
'x-header': 'x_value',
},
{
'content-type': 'application/json',
'user-agent': 'GitHub-Hookshot/dict-test',
'x-github-delivery': UNCHANGED_UUID4_STR,
'x-github-event': 'pull_request',
'x-header': 'x_value',
},
id='unchanged',
),
pytest.param(
Expand Down

0 comments on commit b3c0dd9

Please sign in to comment.