1
0
Fork 0
forked from github/pelican

force locale to ascii in functional tests

This commit is contained in:
Bruno Binet 2012-05-19 23:44:37 +02:00
commit ef77847762
2 changed files with 5 additions and 1 deletions

View file

@ -8,7 +8,7 @@ GITHUB_URL = 'http://github.com/ametaireau/'
DISQUS_SITENAME = "blog-notmyidea"
PDF_GENERATOR = False
REVERSE_CATEGORY_ORDER = True
LOCALE = ""
LOCALE = "C"
DEFAULT_PAGINATION = 4
FEED_RSS = 'feeds/all.rss.xml'

View file

@ -7,6 +7,7 @@ import os
from filecmp import dircmp
from tempfile import mkdtemp
from shutil import rmtree
import locale
from mock import patch
@ -27,9 +28,12 @@ class TestPelican(unittest.TestCase):
def setUp(self):
self.temp_path = mkdtemp()
self.old_locale = locale.setlocale(locale.LC_ALL)
locale.setlocale(locale.LC_ALL, 'C')
def tearDown(self):
rmtree(self.temp_path)
locale.setlocale(locale.LC_ALL, self.old_locale)
def test_basic_generation_works(self):
# when running pelican without settings, it should pick up the default