move botan from utils to ext

This commit is contained in:
Rahiel Kasim 2016-05-24 23:40:09 +02:00
parent f45ecee820
commit c4d5eff9f3
2 changed files with 8 additions and 14 deletions

View file

@ -1,23 +1,17 @@
#!/usr/bin/env python
import logging import logging
from telegram import NullHandler from telegram import NullHandler
try: from future.moves.urllib.parse import quote
from urllib.request import urlopen, Request from future.moves.urllib.error import HTTPError, URLError
from urllib.parse import quote from future.moves.urllib.request import urlopen, Request
from urllib.error import URLError, HTTPError
except ImportError:
from urllib2 import urlopen, Request
from urllib import quote
from urllib2 import URLError, HTTPError
logging.getLogger(__name__).addHandler(NullHandler()) logging.getLogger(__name__).addHandler(NullHandler())
class Botan(object): class Botan(object):
"""This class helps to send incoming events in your botan analytics account. """This class helps to send incoming events to your botan analytics account.
See more: https://github.com/botanio/sdk#botan-sdk""" See more: https://github.com/botanio/sdk#botan-sdk
"""
token = '' token = ''
url_template = 'https://api.botan.io/track?token={token}' \ url_template = 'https://api.botan.io/track?token={token}' \

View file

@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
"""This module contains a object that represents Tests for Botan analytics integration""" """This module contains an object that represents Tests for Botan analytics integration"""
import sys import sys
import unittest import unittest
@ -9,7 +9,7 @@ from flaky import flaky
sys.path.append('.') sys.path.append('.')
from telegram.utils.botan import Botan from telegram.ext.botan import Botan
from tests.base import BaseTest from tests.base import BaseTest