1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Fix python3 can not send file by string bug.

bug #40
This commit is contained in:
eternnoir
2015-07-17 09:35:37 +08:00
parent 634f88323c
commit 621b191e8d
2 changed files with 23 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import time
sys.path.append('../')
from telebot import types
from telebot import apihelper
import telebot
@ -37,3 +38,17 @@ def create_text_message(text):
params['text'] = text
return types.Message(1, None, None, 1, 'text', params)
def test_is_string_unicode():
s1 = u'string'
assert apihelper.is_string(s1)
def test_is_string_string():
s1 = 'string'
assert apihelper.is_string(s1)
def test_not_string():
i1 = 10
assert not apihelper.is_string(i1)