Skip to content

Commit

Permalink
fix test for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Aug 8, 2013
1 parent c156e26 commit a60a010
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ WTForms>=1.0.4
# for testing
nose
Flask-Babel
# -e git://github.com/mitsuhiko/babel.git#egg=Babel
5 changes: 4 additions & 1 deletion tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a60a010

Please sign in to comment.