File no_network_tests.patch of Package python-reportlab.29359
--- a/tests/test_platypus_general.py
+++ b/tests/test_platypus_general.py
@@ -318,9 +318,10 @@ def getCommentary():
code(''' story.append(platypus.Image('%s'))'''% getFurl(_GIFUTF8))
code(''' story.append(platypus.Image(open_for_read('%s','b')))''' % _GIFUTF8)
story.append(FrameBreak())
- story.append(Paragraph("""Images can even be obtained from the internet.""", styleSheet['BodyText']))
- code(''' img = platypus.Image('http://www.reportlab.com/rsrc/encryption.gif')
- story.append(img)''')
+ # No network access in OBS, so this doesn't work
+ # story.append(Paragraph("""Images can even be obtained from the internet.""", styleSheet['BodyText']))
+ # code(''' img = platypus.Image('http://www.reportlab.com/rsrc/encryption.gif')
+ # story.append(img)''')
story.append(FrameBreak())
if _JPG:
@@ -562,6 +563,7 @@ def run():
class PlatypusTestCase(unittest.TestCase):
"Make documents with lots of Platypus features"
+ @unittest.skip("No network access")
def test0(self):
"Make a platypus document"
run()
--- a/tests/test_lib_utils.py
+++ b/tests/test_lib_utils.py
@@ -108,6 +108,7 @@ class ImporterTestCase(unittest.TestCase
"test open and read of a relative file: URL"
b = _rel_open_and_read('file:../docs/images/Edit_Prefs.gif')
+ @unittest.skip('No network access')
def test9(self):
"test open and read of an http: URL"
from reportlab.lib.utils import open_and_read
@@ -125,9 +126,9 @@ class ImporterTestCase(unittest.TestCase
try:
m1 = recursiveImport('reportlab.pdfgen.brush')
self.fail("Imported a nonexistent module")
- except ImportError, e:
+ except ImportError as e:
self.assertEquals(e.message, "Could not import 'reportlab.pdfgen.brush'")
-
+
try:
m1 = recursiveImport('totally.non.existent')
self.fail("Imported a nonexistent module")