Commit 4152721c authored by sirex's avatar sirex

Fix failing py34 tests

parent 1bebf4c1
...@@ -10,7 +10,7 @@ import subprocess ...@@ -10,7 +10,7 @@ import subprocess
import tempfile import tempfile
import unittest import unittest
from six import StringIO from six import BytesIO
import zc.buildout import zc.buildout
...@@ -59,8 +59,8 @@ class fixture(object): ...@@ -59,8 +59,8 @@ class fixture(object):
('urlopen', 'rubygems.urllib.request.urlopen'), ('urlopen', 'rubygems.urllib.request.urlopen'),
('hexagonit', 'rubygems.hexagonit.recipe.download.Recipe'), ('hexagonit', 'rubygems.hexagonit.recipe.download.Recipe'),
)) ))
self.patches['urlopen'].return_value = StringIO( self.patches['urlopen'].return_value = BytesIO(
'https://rubygems.org/rubygems/rubygems-1.0.zip' b'https://rubygems.org/rubygems/rubygems-1.0.zip'
) )
self.makedirs(( self.makedirs((
...@@ -176,7 +176,7 @@ class RubyGemsTests(unittest.TestCase): ...@@ -176,7 +176,7 @@ class RubyGemsTests(unittest.TestCase):
@fixture({'recipe': {'gems': 'sass'}}) @fixture({'recipe': {'gems': 'sass'}})
def test_no_version(self, path, patches, buildout, name, options): def test_no_version(self, path, patches, buildout, name, options):
patches['urlopen'].return_value = StringIO('') patches['urlopen'].return_value = BytesIO(b'')
recipe = rubygems.Recipe(buildout, name, options) recipe = rubygems.Recipe(buildout, name, options)
self.assertRaises(zc.buildout.UserError, recipe.install) self.assertRaises(zc.buildout.UserError, recipe.install)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment