From 2d98bb3320994ecfc42c6a204255cfcbe335ad14 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Thu, 1 Feb 2024 18:24:14 +0300 Subject: [PATCH] update --- SOURCES/0001-Fix-django-tests.patch | 37 ----------------------------- 1 file changed, 37 deletions(-) delete mode 100644 SOURCES/0001-Fix-django-tests.patch diff --git a/SOURCES/0001-Fix-django-tests.patch b/SOURCES/0001-Fix-django-tests.patch deleted file mode 100644 index ccbb81a..0000000 --- a/SOURCES/0001-Fix-django-tests.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3bb7b0923a197f40ba9d3463c9340c2525c3f3ff Mon Sep 17 00:00:00 2001 -From: "Brian C. Lane" -Date: Mon, 16 Jul 2018 14:23:01 -0700 -Subject: [PATCH] Fix django tests - -When django isn't installed it shouldn't evaluate django.VERSION -otherwise it will crash. decorators are always evaluated, so this needs -to be short-circuited. ---- - tests/test_django.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/test_django.py b/tests/test_django.py -index 1c3c46a..489caf4 100644 ---- a/tests/test_django.py -+++ b/tests/test_django.py -@@ -139,7 +139,7 @@ class DjangoFieldTestCase(unittest.TestCase): - self.assertEqual(Version('23.0.0'), obj2.version) - self.assertEqual(Version('0.1.2+3.4.5-6', partial=True), obj2.partial) - -- @unittest.skipIf(django.VERSION[:2] < (1, 8), "Django<1.8 casts values on setattr") -+ @unittest.skipIf(django_loaded and django.VERSION[:2] < (1, 8), "Django<1.8 casts values on setattr") - def test_invalid_input(self): - v = models.VersionModel(version='0.1.1', spec='blah') - self.assertRaises(ValueError, v.full_clean) -@@ -147,7 +147,7 @@ class DjangoFieldTestCase(unittest.TestCase): - v2 = models.VersionModel(version='0.1', spec='==0.1.1,!=0.1.1-alpha') - self.assertRaises(ValueError, v2.full_clean) - -- @unittest.skipUnless(django.VERSION[:2] < (1, 8), "Django>=1.8 doesn't mangle setattr") -+ @unittest.skipUnless(django_loaded and django.VERSION[:2] < (1, 8), "Django>=1.8 doesn't mangle setattr") - def test_invalid_input_full_clean(self): - self.assertRaises(ValueError, models.VersionModel, version='0.1.1', spec='blah') - self.assertRaises(ValueError, models.VersionModel, version='0.1', spec='==0.1.1,!=0.1.1-alpha') --- -2.17.1 -