[Python-modules-commits] [sorl-thumbnail] 03/04: update patch to disable HTTP requests during tests (Closes: #857707)

Wolfgang Borgert debacle at moszumanska.debian.org
Thu Apr 27 18:13:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository sorl-thumbnail.

commit 32a1a082652e77e1a8abebc8ea40bb05a4842c29
Author: W. Martin Borgert <debacle at debian.org>
Date:   Thu Apr 27 00:59:42 2017 +0200

    update patch to disable HTTP requests during tests (Closes: #857707)
---
 debian/changelog                        |  2 ++
 debian/patches/disable_http_tests.patch | 36 +++++++++++++++++++++++++++------
 2 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 33fb8ea..961bdb5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ sorl-thumbnail (12.3+git20160928-2) UNRELEASED; urgency=medium
 
   * Disable support for Wand again, because tests crash on i386
     (Closes: #860668).
+  * Update patch to disable HTTP requests during tests
+    (Closes: #857707).
   * Mark python-sorl-thumbnail-doc as Multi-Arch: foreign.
 
  -- W. Martin Borgert <debacle at debian.org>  Wed, 26 Apr 2017 22:10:48 +0000
diff --git a/debian/patches/disable_http_tests.patch b/debian/patches/disable_http_tests.patch
index b0e125d..213772f 100644
--- a/debian/patches/disable_http_tests.patch
+++ b/debian/patches/disable_http_tests.patch
@@ -1,6 +1,7 @@
 From 8d83ae645900b535160dbe3becc7c0cc651b13cd Mon Sep 17 00:00:00 2001
 From: Michael Fladischer <FladischerMichael at fladi.at>
 Date: Thu, 8 Oct 2015 13:53:16 -0700
+Update: 2017-04-26, W. Martin Borgert <debacle at debian.org>
 Subject: Disable HTTP requests during build
 
  Remote resources such as images fetched over HTTP are not allowed at build
@@ -15,11 +16,9 @@ Patch-Name: disable_http_tests.patch
  tests/thumbnail_tests/test_templatetags.py |  2 ++
  2 files changed, 9 insertions(+), 6 deletions(-)
 
-diff --git a/tests/thumbnail_tests/test_engines.py b/tests/thumbnail_tests/test_engines.py
-index 4ef4617..da6a86a 100644
 --- a/tests/thumbnail_tests/test_engines.py
 +++ b/tests/thumbnail_tests/test_engines.py
-@@ -192,12 +192,13 @@ class SimpleTestCase(BaseTestCase):
+@@ -192,12 +192,13 @@
              default.kvstore.get(im).serialize_storage(),
              'tests.thumbnail_tests.storage.TestStorage',
          )
@@ -39,8 +38,6 @@ index 4ef4617..da6a86a 100644
  
      def test_abspath(self):
          item = Item.objects.get(image='500x500.jpg')
-diff --git a/tests/thumbnail_tests/test_templatetags.py b/tests/thumbnail_tests/test_templatetags.py
-index c774dea..60de741 100644
 --- a/tests/thumbnail_tests/test_templatetags.py
 +++ b/tests/thumbnail_tests/test_templatetags.py
 @@ -1,6 +1,7 @@
@@ -51,7 +48,7 @@ index c774dea..60de741 100644
  from subprocess import Popen, PIPE
  from PIL import Image
  
-@@ -113,10 +114,12 @@ class TemplateTestCaseA(BaseTestCase):
+@@ -120,10 +121,12 @@
  
  
  class TemplateTestCaseB(BaseTestCase):
@@ -64,3 +61,30 @@ index c774dea..60de741 100644
      def test_portrait(self):
          val = render_to_string('thumbnail4.html', {
              'source': 'http://dummyimage.com/120x100/',
+--- a/tests/thumbnail_tests/test_filters.py
++++ b/tests/thumbnail_tests/test_filters.py
+@@ -1,4 +1,8 @@
+ # -*- coding: utf-8 -*-
++
++import os
++import unittest
++
+ import pytest
+ from django.template.loader import render_to_string
+ 
+@@ -9,6 +13,7 @@
+ 
+ 
+ class FilterTestCase(BaseTestCase):
++    @unittest.skipIf(os.environ.get('LOCAL_BUILD', False), "No remote resources desired")
+     def test_html_filter(self):
+         text = '<img alt="A image!" src="http://dummyimage.com/800x800" />'
+         val = render_to_string('htmlfilter.html', {'text': text, }).strip()
+@@ -29,6 +34,7 @@
+             val
+         )
+ 
++    @unittest.skipIf(os.environ.get('LOCAL_BUILD', False), "No remote resources desired")
+     def test_markdown_filter(self):
+         text = '![A image!](http://dummyimage.com/800x800)'
+         val = render_to_string('markdownfilter.html', {'text': text, }).strip()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sorl-thumbnail.git



More information about the Python-modules-commits mailing list