Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Adding travis and tox configuration to run the app engine tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Wayne Parrott committed Aug 17, 2015
1 parent 77e609f commit 3f182ef
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ env:
- TOX_ENV=docs
- TOX_ENV=system-tests
- TOX_ENV=system-tests3
- TOX_ENV=gae
global:
- GAE_PYTHONPATH=${HOME}/.cache/google_appengine
cache:
directories:
- ${HOME}/.cache
install:
- ./scripts/install.sh
script:
Expand Down
6 changes: 6 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ if [[ "${TOX_ENV}" == "pypy" ]]; then
pyenv install pypy-2.6.0
pyenv global pypy-2.6.0
fi

if [[ "${TOX_ENV}" == "gae" && ! -d ${GAE_PYTHONPATH} ]]; then
python scripts/fetch_gae_sdk.py `dirname ${GAE_PYTHONPATH}`
# Directory is required for the write to well known file test to pass.
mkdir -p ${HOME}/.config/gcloud
fi
10 changes: 10 additions & 0 deletions tests/data/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Dummy app.yaml to placate nosegae.
application: oauth2client
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /.*
script: null.app
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py26,py27,py33,py34,pypy,cover
envlist = py26,py27,py33,py34,pypy,gae,cover

[testenv]
basedeps = keyring
Expand Down Expand Up @@ -51,6 +51,15 @@ basepython = python2.6
deps = {[testenv]basedeps}
django>=1.5,<1.6

[testenv:gae]
basepython = python2.7
deps = {[testenv]basedeps}
nosegae
commands =
nosetests --with-gae --gae-application=tests/data --logging-level=INFO {posargs} tests/test_appengine.py
setenv:
PYTHONPATH={env:GAE_PYTHONPATH:}

[testenv:system-tests]
basepython =
python2.7
Expand Down

0 comments on commit 3f182ef

Please sign in to comment.