Преглед на файлове

chore(api): bump dependencies

Peter Thomassen преди 4 години
родител
ревизия
61d41e9469
променени са 3 файла, в които са добавени 14 реда и са изтрити 15 реда
  1. 1 1
      api/api/settings.py
  2. 5 6
      api/desecapi/tests/base.py
  3. 8 8
      api/requirements.txt

+ 1 - 1
api/api/settings.py

@@ -121,7 +121,7 @@ PASSWORD_HASHERS = DEFAULT_PASSWORD_HASHERS + [PASSWORD_HASHER_TOKEN]
 
 # CORS
 # No need to add Authorization to CORS_ALLOW_HEADERS (included by default)
-CORS_ORIGIN_ALLOW_ALL = True
+CORS_ALLOW_ALL_ORIGINS = True
 
 TEMPLATES = [
     {

+ 5 - 6
api/desecapi/tests/base.py

@@ -161,7 +161,6 @@ class AssertRequestsContextManager:
 
     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 @@ class MockPDNSTestCase(APITestCase):
             '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 @@ class MockPDNSTestCase(APITestCase):
             '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 @@ class MockPDNSTestCase(APITestCase):
             '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 @@ class MockPDNSTestCase(APITestCase):
             '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 @@ class MockPDNSTestCase(APITestCase):
             '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<id>[^/]+)$ (httpretty does not match the method)
         }
 

+ 8 - 8
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