Michael Merickel
2013-04-19 04f989b3cedd1bd227a517c649a3e0e67a8c0388
Merge branch 'fix.981-backport' into 1.4-branch
2 files deleted
2 files modified
52 ■■■■■ changed files
CHANGES.txt 5 ●●●●● patch | view | raw | blame | history
pyramid/tests/fixtures/static/héhé.html 1 ●●●● patch | view | raw | blame | history
pyramid/tests/fixtures/static/héhé/index.html 1 ●●●● patch | view | raw | blame | history
pyramid/tests/test_integration.py 45 ●●●●● patch | view | raw | blame | history
CHANGES.txt
@@ -13,6 +13,11 @@
  of invoking the ``permits`` method of the authorization policy.
  See https://github.com/Pylons/pyramid/issues/954
- Pyramid failed to install on some systems due to being packaged with
  some test files containing higher order characters in their names. These
  files have now been removed. See
  https://github.com/Pylons/pyramid/issues/981
1.4 (2012-12-18)
================
pyramid/tests/fixtures/static/h?h?.html
File was deleted
pyramid/tests/fixtures/static/h?h?/index.html
File was deleted
pyramid/tests/test_integration.py
@@ -3,7 +3,6 @@
import datetime
import locale
import os
import platform
import unittest
from pyramid.wsgi import wsgiapp
@@ -82,27 +81,40 @@
        res = self.testapp.get('/static/.hiddenfile', status=200)
        _assertBody(res.body, os.path.join(here, 'fixtures/static/.hiddenfile'))
    if defaultlocale is not None and platform.system() == 'Linux':
    if defaultlocale is not None:
        # These tests are expected to fail on LANG=C systems due to decode
        # errors and on non-Linux systems due to git highchar handling
        # vagaries
        def test_highchars_in_pathelement(self):
            url = url_quote('/static/héhé/index.html')
            res = self.testapp.get(url, status=200)
            _assertBody(
                res.body,
                os.path.join(here,
                             text_('fixtures/static/héhé/index.html', 'utf-8'))
                )
            path = os.path.join(
                here,
                text_('fixtures/static/héhé/index.html', 'utf-8'))
            pathdir = os.path.dirname(path)
            body = b'<html>hehe</html>\n'
            try:
                os.makedirs(pathdir)
                with open(path, 'wb') as fp:
                    fp.write(body)
                url = url_quote('/static/héhé/index.html')
                res = self.testapp.get(url, status=200)
                self.assertEqual(res.body, body)
            finally:
                os.unlink(path)
                os.rmdir(pathdir)
        def test_highchars_in_filename(self):
            url = url_quote('/static/héhé.html')
            res = self.testapp.get(url, status=200)
            _assertBody(
                res.body,
                os.path.join(here,
                             text_('fixtures/static/héhé.html', 'utf-8'))
                )
            path = os.path.join(
                here,
                text_('fixtures/static/héhé.html', 'utf-8'))
            body = b'<html>hehe file</html>\n'
            with open(path, 'wb') as fp:
                fp.write(body)
            try:
                url = url_quote('/static/héhé.html')
                res = self.testapp.get(url, status=200)
                self.assertEqual(res.body, body)
            finally:
                os.unlink(path)
    def test_not_modified(self):
        self.testapp.extra_environ = {
@@ -663,4 +675,3 @@
    data = data.replace(b'\r', b'')
    data = data.replace(b'\n', b'')
    assert(body == data)