diff mbox series

[bug#65758,v7,08/57] gnu: python-django-3.1.14: Skip failing tests.

Message ID 0713b7b67b9817c732e4e0baefbc36ada576316c.1693991781.git.ngraves@ngraves.fr
State New
Headers show
Series [bug#65758,v7,01/57] gnu: python-django-4.0: Update to 4.0.9. | expand

Commit Message

Nicolas Graves Sept. 6, 2023, 9:15 a.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