This repository was archived by the owner on Feb 1, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
from __future__ import with_statement
3
+ from __future__ import unicode_literals
3
4
import re
4
5
from six import u , text_type
5
6
import twilio
@@ -63,7 +64,7 @@ def testSayHelloWorld(self):
63
64
def testSayFrench (self ):
64
65
"""should say hello monkey"""
65
66
r = Response ()
66
- r .append (twiml .Say (u ( "nécessaire et d'autres" )))
67
+ r .append (twiml .Say ("nécessaire et d'autres" )) # it works on python 2.6 with the from __future__ import unicode_literal
67
68
self .assertEquals (text_type (r ),
68
69
'<?xml version="1.0" encoding="UTF-8"?><Response><Say>nécessaire et d\' autres</Say></Response>' )
69
70
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
+ from __future__ import unicode_literals
2
3
from mock import patch , Mock
3
4
from six import u
4
5
from twilio .rest import resources
@@ -42,7 +43,7 @@ def test_double_encoding(resp_mock, mock):
42
43
http = mock .return_value
43
44
http .request .return_value = (Mock (), Mock ())
44
45
45
- body = u ( "Chloéñ" )
46
+ body = "Chloéñ" # I can do that with the from future import
46
47
47
48
data = {
48
49
"body" : body .encode ('utf-8' ),
@@ -61,7 +62,7 @@ def test_paging(resp_mock, mock):
61
62
http .request .return_value = (Mock (), Mock ())
62
63
63
64
data = {
64
- "body" : u ( "Chloéñ" ),
65
+ "body" : "Chloéñ" , # I can do that with the from future import
65
66
}
66
67
67
68
resources .make_request ("GET" , "http://www.example.com" , data = data )
You can’t perform that action at this time.
0 commit comments