Commit 09d5804a by Sheng

Prepare to write unit tests

parent a39657a0
[run]
branch = true
source = webssh
[report]
exclude_lines =
if self.debug:
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
ignore_errors = True
omit =
tests/*
...@@ -36,6 +36,7 @@ htmlcov/ ...@@ -36,6 +36,7 @@ htmlcov/
.tox/ .tox/
.coverage .coverage
.cache .cache
.pytest_cache/
nosetests.xml nosetests.xml
coverage.xml coverage.xml
......
dist: trusty
sudo: false
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
install:
- pip install -r requirements.txt
- pip install pytest pytest-cov codecov flake8
script:
- pytest --cov=webssh
- flake8 --exclude='.git'
after_success:
- codecov
## WebSSH ## WebSSH
A simple web application to be used as an ssh client to connect to your ssh servers. It is written in Python, base on Tornado and Paramiko. [![Build Status](https://travis-ci.org/huashengdun/webssh.svg?branch=master)](https://travis-ci.org/huashengdun/webssh)
[![codecov](https://codecov.io/gh/huashengdun/webssh/branch/master/graph/badge.svg)](https://codecov.io/gh/huashengdun/webssh)
![license](https://img.shields.io/github/license/mashape/apistatus.svg)
A simple web application to be used as an ssh client to connect to your ssh servers. It is written in Python, base on tornado and paramiko.
### Preview ### Preview
![Login](https://github.com/huashengdun/webssh/raw/master/preview/login.png) ![Login](https://github.com/huashengdun/webssh/raw/master/preview/login.png)
...@@ -18,7 +22,7 @@ A simple web application to be used as an ssh client to connect to your ssh serv ...@@ -18,7 +22,7 @@ A simple web application to be used as an ssh client to connect to your ssh serv
git clone https://github.com/huashengdun/webssh.git git clone https://github.com/huashengdun/webssh.git
cd webssh cd webssh
pip install -r requirements.txt pip install -r requirements.txt
python main.py python webssh/main.py
``` ```
### Options ### Options
...@@ -41,7 +45,7 @@ python main.py --help ...@@ -41,7 +45,7 @@ python main.py --help
### Nginx config example for running this app behind an nginx server ### Nginx config example for running this app behind an nginx server
``` ```
location / { location / {
proxy_pass http://127.0.0.1:8888; proxy_pass http://127.0.0.1:8888;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_read_timeout 300; proxy_read_timeout 300;
...@@ -50,7 +54,7 @@ location / { ...@@ -50,7 +54,7 @@ location / {
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Real-PORT $remote_port;
} }
``` ```
### Tips ### Tips
......
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