diff mbox series

[bug#55474,v5,09/55] gnu: python-django-3.1.14: Skip failing tests.

Message ID b96844c33c9d0fdc2bb20b12e98c7799cc80c3c9.1687712245.git.ngraves@ngraves.fr
State New
Headers show
Series [bug#55474,v5,01/55] gnu: python-django-4.0: Update to 4.0.9. | expand

Commit Message

Nicolas Graves June 25, 2023, 4:57 p.m. UTC
* gnu/packages/django.scm (python-django-3.1.14): Skip failing tests..
[propagated-inputs]: Replace python-agriref by python-asgiref-3.4.1.
---
 gnu/packages/django.scm | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 6845872ec7..84f18fc3d1 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -34,6 +34,7 @@  (define-module (gnu packages django)
   #:use-module (guix gexp)
   #:use-module (guix build-system python)
   #:use-module (guix deprecation)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
@@ -178,10 +179,39 @@  (define-public python-django-3.1.14
               (sha256
                (base32
                 "0ix3v2wlnplv78zxjrlw8z3hiap2d5mxvk0ny2fc65526shsb93j"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments python-django-3.2)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (add-after 'unpack 'skip-failing-tests
+              (lambda _
+                (substitute* "tests/inspectdb/tests.py"
+                  (("import mock, skipUnless")
+                   "import mock, skipUnless, skipIf")
+                  (("@skipUnless\\(connection\\.vendor == 'sqlite',")
+                   "@skipIf(True, "))
+                (substitute* "tests/fixtures/tests.py"
+                  (("import mock")
+                   "import mock, skipIf")
+                  (("(def test_dumpdata_proxy_with_concrete\\(self\\):)"
+                    content all)
+                   (string-append
+                    "@skipIf(True, \""
+                    "A warning isn't displayed if a proxy model is dumped with "
+                    "its concrete parent."
+                    "\")\n    " content)))
+                (substitute* "tests/httpwrappers/tests.py"
+                  (("(def test_memoryview_content\\(self\\):)"
+                    content all)
+                   (string-append
+                    "@unittest.skipIf(True, 'Bad assertion')\n    "
+                    content)))))))))
     (propagated-inputs
      (modify-inputs (package-propagated-inputs python-django-3.2)
        ;; Django 4.0 deprecated pytz in favor of Pythons built-in zoneinfo.
-       (append python-pytz)))))
+       (append python-pytz)
+       (delete "python-asgiref")
+       (append python-asgiref-3.4.1)))))
 
 (define-public python-django-2.2
   (package