import types import uuid import requests if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest curpath = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.insert(0, curpath) import upyun from upyun import FileStore upyun.add_stderr_logger() def b(s): PY3 = sys.version_info[0] == 3 if PY3: return s.encode('utf-8') else: return s SERVICE = os.getenv('UPYUN_SERVICE') USERNAME = os.getenv('UPYUN_USERNAME') PASSWORD = os.getenv('UPYUN_PASSWORD')
import json import datetime if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest curpath = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.insert(0, curpath) import upyun from upyun import FileStore upyun.add_stderr_logger() def b(s): PY3 = sys.version_info[0] == 3 if PY3: return s.encode('utf-8') else: return s BUCKET = os.getenv('UPYUN_BUCKET') USERNAME = os.getenv('UPYUN_USERNAME') PASSWORD = os.getenv('UPYUN_PASSWORD') SECRET = os.getenv('UPYUN_SECRET')