Permalink
Browse files

fix test for python3

  • Loading branch information...
1 parent c156e26 commit a60a010c628e91bd46f51600d53134f0f9bbe414 @lepture committed Aug 8, 2013
Showing with 4 additions and 10 deletions.
  1. +0 −8 .travis.yml
  2. +0 −1 requirements.txt
  3. +4 −1 tests/base.py
View
@@ -7,14 +7,6 @@ python:
- "3.3"
install:
- # TODO: remove babel when it is released
- - pip install pytz
- - git clone https://github.com/mitsuhiko/babel.git
- - cd babel
- - python setup.py import_cldr install
- - cd ..
- - rm -fr babel
- # Normal installation
- pip install -r requirements.txt
script:
View
@@ -4,4 +4,3 @@ WTForms>=1.0.4
# for testing
nose
Flask-Babel
-# -e git://github.com/mitsuhiko/babel.git#egg=Babel
View
@@ -6,10 +6,13 @@
from flask.ext.wtf import Form
from wtforms import TextField, HiddenField, SubmitField
from wtforms.validators import DataRequired
+from flask.ext.wtf._compat import text_type
def to_unicode(text):
- return text.decode('utf-8')
+ if not isinstance(text, text_type):
+ return text.decode('utf-8')
+ return text
class _JSONEncoder(JSONEncoder):

0 comments on commit a60a010

Please sign in to comment.