Pip6 cache system and codacy issues
This commit is contained in:
parent
ecf4e66e11
commit
638363c6f9
@ -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"
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
7
tox.ini
7
tox.ini
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user