diff --git a/api/api/settings.py b/api/api/settings.py index 5611b8d39..bed20712e 100644 --- a/api/api/settings.py +++ b/api/api/settings.py @@ -121,7 +121,7 @@ # CORS # No need to add Authorization to CORS_ALLOW_HEADERS (included by default) -CORS_ORIGIN_ALLOW_ALL = True +CORS_ALLOW_ALL_ORIGINS = True TEMPLATES = [ { diff --git a/api/desecapi/tests/base.py b/api/desecapi/tests/base.py index 23c546f5d..4d42eae3e 100644 --- a/api/desecapi/tests/base.py +++ b/api/desecapi/tests/base.py @@ -161,7 +161,6 @@ def __init__(self, test_case, expected_requests, single_expectation_single_reque def __enter__(self): hr_core.POTENTIAL_HTTP_PORTS.add(8081) # FIXME should depend on self.expected_requests - self.expected_requests = self.expected_requests # noinspection PyProtectedMember self.old_httpretty_entries = httpretty._entries.copy() # FIXME accessing private properties of httpretty for request in self.expected_requests: @@ -297,7 +296,7 @@ def request_pdns_zone_create(cls, ns, **kwargs): 'method': 'POST', 'uri': cls.get_full_pdns_url(cls.PDNS_ZONES, ns=ns), 'status': 201, - 'body': None, + 'body': '', 'match_querystring': True, **kwargs } @@ -332,7 +331,7 @@ def request_pdns_zone_delete(cls, name=None, ns='LORD'): 'method': 'DELETE', 'uri': cls.get_full_pdns_url(cls.PDNS_ZONE, ns=ns, id=cls._pdns_zone_id_heuristic(name)), 'status': 200, - 'body': None, + 'body': '', } @classmethod @@ -341,7 +340,7 @@ def request_pdns_zone_update(cls, name=None): 'method': 'PATCH', 'uri': cls.get_full_pdns_url(cls.PDNS_ZONE, id=cls._pdns_zone_id_heuristic(name)), 'status': 200, - 'body': None, + 'body': '', } def request_pdns_zone_update_assert_body(self, name: str = None, updated_rr_sets: Union[List[RRset], Dict] = None): @@ -455,7 +454,7 @@ def request_pdns_zone_axfr(cls, name=None): 'method': 'PUT', 'uri': cls.get_full_pdns_url(cls.PDNS_ZONE_AXFR, ns='MASTER', id=cls._pdns_zone_id_heuristic(name)), 'status': 200, - 'body': None, + 'body': '', } @classmethod @@ -464,7 +463,7 @@ def request_pdns_update_catalog(cls): 'method': 'PATCH', 'uri': cls.get_full_pdns_url(cls.PDNS_ZONE, ns='MASTER', id=cls._pdns_zone_id_heuristic('catalog.internal')), 'status': 204, - 'body': None, + 'body': '', 'priority': 1, # avoid collision with DELETE zones/(?P[^/]+)$ (httpretty does not match the method) } diff --git a/api/requirements.txt b/api/requirements.txt index 85ceedd51..dcccbbb99 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,18 +1,18 @@ captcha~=0.3.0 -celery~=4.4.0 -coverage~=5.0 +celery~=5.0.2 +coverage~=5.3 cryptography~=3.2.1 Django~=3.1.0 -django-cors-headers~=3.2.0 -djangorestframework~=3.11.0 +django-cors-headers~=3.5.0 +djangorestframework~=3.12.2 django-celery-email~=3.0.0 django-netfields~=1.2.2 -django-prometheus~=2.0.0 +django-prometheus~=2.1.0 dnspython~=2.0.0 -httpretty~=0.9.0 +httpretty~=1.0.2 psycopg2~=2.8.5 -prometheus-client~=0.8.0 # added to control django-prometheus' dependency version +prometheus-client~=0.9.0 # added to control django-prometheus' dependency version psl-dns~=1.0 pylibmc~=1.6.1 -requests~=2.23.0 +requests~=2.25.0 uwsgi~=2.0.0