add tests
This commit is contained in:
parent
e938863ae6
commit
74ff217c7e
13
.gitignore
vendored
13
.gitignore
vendored
|
@ -1,9 +1,3 @@
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
|
|
||||||
gogs
|
|
||||||
*.exe
|
|
||||||
*.exe~
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.db
|
*.db
|
||||||
*.log
|
*.log
|
||||||
|
@ -14,8 +8,6 @@ data/
|
||||||
*.iml
|
*.iml
|
||||||
public/img/avatar/
|
public/img/avatar/
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> b4db9f67548a41922f1b337daf9c9d2b975b55c4
|
|
||||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||||
*.o
|
*.o
|
||||||
*.a
|
*.a
|
||||||
|
@ -37,4 +29,7 @@ _cgo_export.*
|
||||||
|
|
||||||
_testmain.go
|
_testmain.go
|
||||||
|
|
||||||
*.exe
|
*.exe
|
||||||
|
*.exe~
|
||||||
|
gogs
|
||||||
|
__pycache__
|
||||||
|
|
9
tests/.travel.yml
Normal file
9
tests/.travel.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
command: python -m pytest {}
|
||||||
|
include: ^test_.*\.py$
|
||||||
|
path: ./
|
||||||
|
depth: 1
|
||||||
|
verbose: true
|
||||||
|
timeout: 1m
|
||||||
|
reload: false
|
||||||
|
html: test.html
|
||||||
|
notify: []
|
14
tests/README.md
Normal file
14
tests/README.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
## gogs test
|
||||||
|
|
||||||
|
this is for developers
|
||||||
|
|
||||||
|
## prepare environment
|
||||||
|
# install python dependency
|
||||||
|
pip install pytest
|
||||||
|
# install basic test tool
|
||||||
|
go get -u github.com/shxsun/travelexec
|
||||||
|
# start gogs server
|
||||||
|
gogs web
|
||||||
|
|
||||||
|
## start test
|
||||||
|
travelexec
|
13
tests/pyquick/test_index_rest.py
Normal file
13
tests/pyquick/test_index_rest.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# coding: utf-8
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
HOST = 'http://localhost:3000'
|
||||||
|
|
||||||
|
def test_index_get():
|
||||||
|
r = requests.get(HOST + '/')
|
||||||
|
assert r.status_code == 200
|
||||||
|
|
Loading…
Reference in New Issue
Block a user