Pip6 cache system and codacy issues

This commit is contained in:
Valentin Samir 2016-06-30 14:52:55 +02:00
parent ecf4e66e11
commit 638363c6f9
4 changed files with 7 additions and 12 deletions

View File

@ -2,8 +2,6 @@ language: python
python:
- "2.7"
env:
global:
- PIP_DOWNLOAD_CACHE=$HOME/.pip_cache
matrix:
- TOX_ENV=coverage
- TOX_ENV=flake8
@ -15,7 +13,7 @@ env:
- TOX_ENV=py34-django19
cache:
directories:
- $HOME/.pip-cache/
- $HOME/.cache/pip/
- $HOME/build/nitmir/django-cas-server/.tox/
install:
- "travis_retry pip install setuptools --upgrade"

View File

@ -161,7 +161,8 @@ class XmlContent(object):
class UserModels(object):
"""Mixin for test on CAS user models"""
def expire_user(self):
@staticmethod
def expire_user():
"""return an expired user"""
client = get_auth_client()
@ -172,7 +173,8 @@ class UserModels(object):
).update(date=new_date)
return client
def get_user(self, client):
@staticmethod
def get_user(client):
"""return the user associated with an authenticated client"""
return models.User.objects.get(
username=settings.CAS_TEST_USER,

View File

@ -94,8 +94,8 @@ class TicketTestCase(TestCase, UserModels, BaseServicePattern):
)
models.ReplaceAttributName.objects.create(name="*", service_pattern=self.service_pattern)
@staticmethod
def get_ticket(
self,
user,
ticket_class,
service,

View File

@ -15,11 +15,9 @@ exclude=migrations
[base]
deps =
-r{toxinidir}/requirements-dev.txt
passenv=PIP_DOWNLOAD_CACHE
[testenv]
commands=py.test {posargs:cas_server/tests/}
passenv={[base]passenv}
[testenv:py27-django17]
basepython=python2.7
@ -61,13 +59,10 @@ deps =
basepython=python
deps=flake8
commands=flake8 {toxinidir}/cas_server
passenv={[base]passenv}
[testenv:coverage]
basepython=python
passenv=
CODACY_PROJECT_TOKEN
{[base]passenv}
passenv=CODACY_PROJECT_TOKEN
deps=
-r{toxinidir}/requirements-dev.txt
codacy-coverage