[Python-modules-commits] r20004 - in packages/sorl-thumbnail/trunk/debian (5 files)
fladi-guest at users.alioth.debian.org
fladi-guest at users.alioth.debian.org
Thu Jan 12 12:58:52 UTC 2012
Date: Thursday, January 12, 2012 @ 12:58:51
Author: fladi-guest
Revision: 20004
Skip tests that require HTTP connections (Closes: #655568).
Added:
packages/sorl-thumbnail/trunk/debian/patches/
packages/sorl-thumbnail/trunk/debian/patches/disable_http_tests.patch
packages/sorl-thumbnail/trunk/debian/patches/series
Modified:
packages/sorl-thumbnail/trunk/debian/changelog
packages/sorl-thumbnail/trunk/debian/rules
Modified: packages/sorl-thumbnail/trunk/debian/changelog
===================================================================
--- packages/sorl-thumbnail/trunk/debian/changelog 2012-01-12 10:10:18 UTC (rev 20003)
+++ packages/sorl-thumbnail/trunk/debian/changelog 2012-01-12 12:58:51 UTC (rev 20004)
@@ -1,3 +1,9 @@
+sorl-thumbnail (11.12-2) unstable; urgency=low
+
+ * Skip tests that require HTTP connections (Closes: #655568).
+
+ -- Michael Fladischer <FladischerMichael at fladi.at> Mon, 02 Jan 2012 15:46:07 +0100
+
sorl-thumbnail (11.12-1) unstable; urgency=low
* Initial release (Closes: #527166)
Added: packages/sorl-thumbnail/trunk/debian/patches/disable_http_tests.patch
===================================================================
--- packages/sorl-thumbnail/trunk/debian/patches/disable_http_tests.patch (rev 0)
+++ packages/sorl-thumbnail/trunk/debian/patches/disable_http_tests.patch 2012-01-12 12:58:51 UTC (rev 20004)
@@ -0,0 +1,43 @@
+Description: Disable HTTP requests during build
+ Remote resources such as images fetched over HTTP are not allowed at build
+ time so this patch skips these tests if the environment variable
+ LOCAL_BUILD is present.
+Author: Michael Fladischer <FladischerMichael at fladi.at>
+Last-Update: 2012-01-12
+Forwarded: not-needed
+
+--- a/tests/thumbnail_tests/tests.py
++++ b/tests/thumbnail_tests/tests.py
+@@ -241,12 +241,13 @@
+ default.kvstore.get(im).serialize_storage(),
+ 'thumbnail_tests.storage.TestStorage',
+ )
+- im = ImageFile('http://www.aino.se/media/i/logo.png')
+- default.kvstore.set(im)
+- self.assertEqual(
+- default.kvstore.get(im).serialize_storage(),
+- 'sorl.thumbnail.images.UrlStorage',
+- )
++ if not os.environ.get('LOCAL_BUILD', False):
++ im = ImageFile('http://www.aino.se/media/i/logo.png')
++ default.kvstore.set(im)
++ self.assertEqual(
++ default.kvstore.get(im).serialize_storage(),
++ 'sorl.thumbnail.images.UrlStorage',
++ )
+
+ def test_abspath(self):
+ item = Item.objects.get(image='500x500.jpg')
+@@ -355,10 +356,12 @@
+ except Exception:
+ pass
+
++ @unittest.skipIf(os.environ.get('LOCAL_BUILD', False), "No remote resources desired")
+ def testUrl(self):
+ val = render_to_string('thumbnail3.html', {}).strip()
+ self.assertEqual(val, '<img style="margin:0px 0px 0px 0px" width="20" height="20">')
+
++ @unittest.skipIf(os.environ.get('LOCAL_BUILD', False), "No remote resources desired")
+ def testPortrait(self):
+ val = render_to_string('thumbnail4.html', {
+ 'source': 'http://www.aino.se/media/i/logo.png',
Added: packages/sorl-thumbnail/trunk/debian/patches/series
===================================================================
--- packages/sorl-thumbnail/trunk/debian/patches/series (rev 0)
+++ packages/sorl-thumbnail/trunk/debian/patches/series 2012-01-12 12:58:51 UTC (rev 20004)
@@ -0,0 +1 @@
+disable_http_tests.patch
Modified: packages/sorl-thumbnail/trunk/debian/rules
===================================================================
--- packages/sorl-thumbnail/trunk/debian/rules 2012-01-12 10:10:18 UTC (rev 20003)
+++ packages/sorl-thumbnail/trunk/debian/rules 2012-01-12 12:58:51 UTC (rev 20004)
@@ -31,7 +31,7 @@
set -e; \
for python in $(shell pyversions -r); do \
for name in pil pgmagick imagemagick graphicsmagick; do \
- LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=tests $$python tests/runtests.py --settings=settings.$$name ; \
+ LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=tests LOCAL_BUILD=1 $$python tests/runtests.py --settings=settings.$$name ; \
done; \
done
rm -rf tmp-locales
More information about the Python-modules-commits
mailing list