summaryrefslogtreecommitdiff
path: root/dev-python/django-filter/files/django-filter-21.1-test-skipIf.patch
blob: adaf8ba428d11eb3a6d1d5060c351261f2e8c3a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From db97686a9950cc1a372d27dfbb90b19ceece3f65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Fri, 24 Sep 2021 21:22:41 +0200
Subject: [PATCH] Fix inverted skipIf for CrispyFormsCompatTests tests

The test is being wrongly skipped when crispy_forms are installed
rather than the other way around.
---
 tests/rest_framework/test_filterset.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/rest_framework/test_filterset.py b/tests/rest_framework/test_filterset.py
index f8b5aae..b6a658d 100644
--- a/tests/rest_framework/test_filterset.py
+++ b/tests/rest_framework/test_filterset.py
@@ -38,7 +38,7 @@ class FilterSetFilterForFieldTests(TestCase):
         self.assertEqual(result.extra['widget'], BooleanWidget)
 
 
-@skipIf(is_crispy(), 'django_crispy_forms must be installed')
+@skipIf(not is_crispy(), 'django_crispy_forms must be installed')
 @override_settings(INSTALLED_APPS=settings.INSTALLED_APPS + ('crispy_forms', ))
 class CrispyFormsCompatTests(TestCase):
 
-- 
2.33.0