mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Fix tests for #4502
This commit is contained in:
parent
05cb47e650
commit
6ab046ba8f
@ -102,7 +102,7 @@ class WebhookTest(APITestCase):
|
||||
|
||||
request_id = uuid.uuid4()
|
||||
|
||||
def dummy_send(_, request):
|
||||
def dummy_send(_, request, **kwargs):
|
||||
"""
|
||||
A dummy implementation of Session.send() to be used for testing.
|
||||
Always returns a 200 HTTP response.
|
||||
|
@ -4,6 +4,7 @@ from unittest.mock import Mock, patch
|
||||
|
||||
import requests
|
||||
from cacheops import CacheMiss, RedisCache
|
||||
from django.conf import settings
|
||||
from django.test import SimpleTestCase, override_settings
|
||||
from packaging.version import Version
|
||||
from requests import Response
|
||||
@ -77,7 +78,8 @@ class GetReleasesTestCase(SimpleTestCase):
|
||||
# Check if correct request is made
|
||||
dummy_request_get.assert_called_once_with(
|
||||
'https://localhost/unittest/releases',
|
||||
headers={'Accept': 'application/vnd.github.v3+json'}
|
||||
headers={'Accept': 'application/vnd.github.v3+json'},
|
||||
proxies=settings.HTTP_PROXIES
|
||||
)
|
||||
|
||||
# Check if result is put in cache
|
||||
@ -105,7 +107,8 @@ class GetReleasesTestCase(SimpleTestCase):
|
||||
# Check if correct request is made
|
||||
dummy_request_get.assert_called_once_with(
|
||||
'https://localhost/unittest/releases',
|
||||
headers={'Accept': 'application/vnd.github.v3+json'}
|
||||
headers={'Accept': 'application/vnd.github.v3+json'},
|
||||
proxies=settings.HTTP_PROXIES
|
||||
)
|
||||
|
||||
# Check if result is put in cache
|
||||
@ -137,7 +140,8 @@ class GetReleasesTestCase(SimpleTestCase):
|
||||
# Check if correct request is made
|
||||
dummy_request_get.assert_called_once_with(
|
||||
'https://localhost/unittest/releases',
|
||||
headers={'Accept': 'application/vnd.github.v3+json'}
|
||||
headers={'Accept': 'application/vnd.github.v3+json'},
|
||||
proxies=settings.HTTP_PROXIES
|
||||
)
|
||||
|
||||
# Check if failure is put in cache
|
||||
|
Loading…
Reference in New Issue
Block a user