diff options
author | skyblue <ssx205@gmail.com> | 2014-03-31 13:30:32 +0800 |
---|---|---|
committer | skyblue <ssx205@gmail.com> | 2014-03-31 13:30:32 +0800 |
commit | 74ff217c7e8855c5ccf6dbc69cee0823cd65ee1b (patch) | |
tree | f5a5b87f54ca603e11c945800c1a12e2a3e3b6f7 /tests | |
parent | e938863ae6887f7c3c24145ed3b64dc1d27ee675 (diff) | |
download | gitea-74ff217c7e8855c5ccf6dbc69cee0823cd65ee1b.tar.gz gitea-74ff217c7e8855c5ccf6dbc69cee0823cd65ee1b.zip |
add tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.travel.yml | 9 | ||||
-rw-r--r-- | tests/README.md | 14 | ||||
-rw-r--r-- | tests/pyquick/test_index_rest.py | 13 |
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/.travel.yml b/tests/.travel.yml new file mode 100644 index 0000000000..820621b283 --- /dev/null +++ b/tests/.travel.yml @@ -0,0 +1,9 @@ +command: python -m pytest {} +include: ^test_.*\.py$ +path: ./ +depth: 1 +verbose: true +timeout: 1m +reload: false +html: test.html +notify: [] diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000000..aba7d388e5 --- /dev/null +++ b/tests/README.md @@ -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 diff --git a/tests/pyquick/test_index_rest.py b/tests/pyquick/test_index_rest.py new file mode 100644 index 0000000000..be0bf18300 --- /dev/null +++ b/tests/pyquick/test_index_rest.py @@ -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 + |