From 305edf5c9f0f6f39dfe827f0f3f935149772b7b0 Mon Sep 17 00:00:00 2001 From: MarkoM-dot <83985775+MarkoM-dot@users.noreply.github.com> Date: Mon, 27 Nov 2023 00:34:05 +0100 Subject: [PATCH] fix(tests): test for membership should be not in --- rest_framework/decorators.py | 2 +- tests/test_throttling.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/decorators.py b/rest_framework/decorators.py index 3b572c09e..619481756 100644 --- a/rest_framework/decorators.py +++ b/rest_framework/decorators.py @@ -36,7 +36,7 @@ def api_view(http_method_names=None): # WrappedAPIView.__doc__ = func.doc <--- Not possible to do this # api_view applied without (method_names) - assert not(isinstance(http_method_names, types.FunctionType)), \ + assert not (isinstance(http_method_names, types.FunctionType)), \ '@api_view missing list of allowed HTTP methods' # api_view applied with eg. string instead of list of strings diff --git a/tests/test_throttling.py b/tests/test_throttling.py index d5a61232d..be9decebc 100644 --- a/tests/test_throttling.py +++ b/tests/test_throttling.py @@ -192,7 +192,7 @@ class ThrottlingTests(TestCase): if expect is not None: assert response['Retry-After'] == expect else: - assert not'Retry-After' in response + assert 'Retry-After' not in response def test_seconds_fields(self): """