Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
audiodude committed Jul 16, 2023
1 parent dc5d101 commit 5051d62
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions wp1/selection/models/petscan_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def test_build_no_format(self, mock_requests):
actual = self.builder.build('text/tab-separated-values',
url='https://petscan.wmflabs.org.fake/?psid=42')
mock_requests.get.assert_called_with(
'https://petscan.wmflabs.org.fake/?psid=42&format=json')
'https://petscan.wmflabs.org.fake/?psid=42&format=json',
headers={
'User-Agent': 'WP 1.0 bot 1.0.0/Audiodude <[email protected]>'
})

@patch('wp1.selection.models.petscan.requests')
def test_build_other_format(self, mock_requests):
Expand All @@ -87,7 +90,10 @@ def test_build_other_format(self, mock_requests):
'text/tab-separated-values',
url='https://petscan.wmflabs.org.fake/?psid=42&format=wiki')
mock_requests.get.assert_called_with(
'https://petscan.wmflabs.org.fake/?psid=42&format=json')
'https://petscan.wmflabs.org.fake/?psid=42&format=json',
headers={
'User-Agent': 'WP 1.0 bot 1.0.0/Audiodude <[email protected]>'
})

@patch('wp1.selection.models.petscan.requests.get')
def test_build_non_200(self, mock_requests_get):
Expand Down

0 comments on commit 5051d62

Please sign in to comment.