Commit ffb776ca by Sheng

Use absolute path for importing modules

parent f78588bc
import sys
sys.path.insert(0, 'webssh')
......@@ -29,7 +29,7 @@ from paramiko.py3compat import u, decodebytes
# setup logging
paramiko.util.log_to_file('sshserver.log')
paramiko.util.log_to_file('tests/sshserver.log')
host_key = paramiko.RSAKey(filename='tests/test_rsa.key')
# host_key = paramiko.DSSKey(filename='test_dss.key')
......
import json
import handler
import webssh.handler as handler
import random
import threading
import tornado.websocket
......@@ -7,8 +7,8 @@ import tornado.gen
from tornado.testing import AsyncHTTPTestCase
from tornado.options import options
from main import make_app, make_handlers
from settings import get_app_settings
from webssh.main import make_app, make_handlers
from webssh.settings import get_app_settings
from tests.sshserver import run_ssh_server
......
......@@ -3,7 +3,7 @@ import os.path
import paramiko
from tornado.httputil import HTTPServerRequest
from handler import MixinHandler, IndexHandler
from webssh.handler import MixinHandler, IndexHandler
class TestMixinHandler(unittest.TestCase):
......
......@@ -4,8 +4,10 @@ import paramiko
from shutil import copyfile
from paramiko.client import RejectPolicy, WarningPolicy
from policy import (AutoAddPolicy, get_policy_dictionary, load_host_keys,
get_policy_class, check_policy_setting)
from webssh.policy import (
AutoAddPolicy, get_policy_dictionary, load_host_keys,
get_policy_class, check_policy_setting
)
class TestPolicy(unittest.TestCase):
......
......@@ -3,8 +3,10 @@ import unittest
import paramiko
import tornado.options as options
from settings import get_host_keys_settings, get_policy_setting, base_dir
from policy import load_host_keys
from webssh.settings import (
get_host_keys_settings, get_policy_setting, base_dir
)
from webssh.policy import load_host_keys
class TestSettings(unittest.TestCase):
......
......@@ -8,7 +8,7 @@ import paramiko
import tornado.web
from tornado.ioloop import IOLoop
from worker import Worker, recycle_worker, workers
from webssh.worker import Worker, recycle_worker, workers
try:
from concurrent.futures import Future
......
......@@ -3,8 +3,8 @@ import tornado.web
import tornado.ioloop
from tornado.options import parse_command_line, options
from handler import IndexHandler, WsockHandler
from settings import (get_app_settings, get_host_keys_settings,
from webssh.handler import IndexHandler, WsockHandler
from webssh.settings import (get_app_settings, get_host_keys_settings,
get_policy_setting)
......
......@@ -3,7 +3,9 @@ import os.path
import uuid
from tornado.options import define
from policy import load_host_keys, get_policy_class, check_policy_setting
from webssh.policy import (
load_host_keys, get_policy_class, check_policy_setting
)
define('address', default='127.0.0.1', help='listen address')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment