Pip6 cache system and codacy issues
This commit is contained in:
parent
ecf4e66e11
commit
638363c6f9
@ -2,8 +2,6 @@ language: python
|
|||||||
python:
|
python:
|
||||||
- "2.7"
|
- "2.7"
|
||||||
env:
|
env:
|
||||||
global:
|
|
||||||
- PIP_DOWNLOAD_CACHE=$HOME/.pip_cache
|
|
||||||
matrix:
|
matrix:
|
||||||
- TOX_ENV=coverage
|
- TOX_ENV=coverage
|
||||||
- TOX_ENV=flake8
|
- TOX_ENV=flake8
|
||||||
@ -15,7 +13,7 @@ env:
|
|||||||
- TOX_ENV=py34-django19
|
- TOX_ENV=py34-django19
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.pip-cache/
|
- $HOME/.cache/pip/
|
||||||
- $HOME/build/nitmir/django-cas-server/.tox/
|
- $HOME/build/nitmir/django-cas-server/.tox/
|
||||||
install:
|
install:
|
||||||
- "travis_retry pip install setuptools --upgrade"
|
- "travis_retry pip install setuptools --upgrade"
|
||||||
|
@ -161,7 +161,8 @@ class XmlContent(object):
|
|||||||
|
|
||||||
class UserModels(object):
|
class UserModels(object):
|
||||||
"""Mixin for test on CAS user models"""
|
"""Mixin for test on CAS user models"""
|
||||||
def expire_user(self):
|
@staticmethod
|
||||||
|
def expire_user():
|
||||||
"""return an expired user"""
|
"""return an expired user"""
|
||||||
client = get_auth_client()
|
client = get_auth_client()
|
||||||
|
|
||||||
@ -172,7 +173,8 @@ class UserModels(object):
|
|||||||
).update(date=new_date)
|
).update(date=new_date)
|
||||||
return client
|
return client
|
||||||
|
|
||||||
def get_user(self, client):
|
@staticmethod
|
||||||
|
def get_user(client):
|
||||||
"""return the user associated with an authenticated client"""
|
"""return the user associated with an authenticated client"""
|
||||||
return models.User.objects.get(
|
return models.User.objects.get(
|
||||||
username=settings.CAS_TEST_USER,
|
username=settings.CAS_TEST_USER,
|
||||||
|
@ -94,8 +94,8 @@ class TicketTestCase(TestCase, UserModels, BaseServicePattern):
|
|||||||
)
|
)
|
||||||
models.ReplaceAttributName.objects.create(name="*", service_pattern=self.service_pattern)
|
models.ReplaceAttributName.objects.create(name="*", service_pattern=self.service_pattern)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def get_ticket(
|
def get_ticket(
|
||||||
self,
|
|
||||||
user,
|
user,
|
||||||
ticket_class,
|
ticket_class,
|
||||||
service,
|
service,
|
||||||
|
7
tox.ini
7
tox.ini
@ -15,11 +15,9 @@ exclude=migrations
|
|||||||
[base]
|
[base]
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements-dev.txt
|
-r{toxinidir}/requirements-dev.txt
|
||||||
passenv=PIP_DOWNLOAD_CACHE
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands=py.test {posargs:cas_server/tests/}
|
commands=py.test {posargs:cas_server/tests/}
|
||||||
passenv={[base]passenv}
|
|
||||||
|
|
||||||
[testenv:py27-django17]
|
[testenv:py27-django17]
|
||||||
basepython=python2.7
|
basepython=python2.7
|
||||||
@ -61,13 +59,10 @@ deps =
|
|||||||
basepython=python
|
basepython=python
|
||||||
deps=flake8
|
deps=flake8
|
||||||
commands=flake8 {toxinidir}/cas_server
|
commands=flake8 {toxinidir}/cas_server
|
||||||
passenv={[base]passenv}
|
|
||||||
|
|
||||||
[testenv:coverage]
|
[testenv:coverage]
|
||||||
basepython=python
|
basepython=python
|
||||||
passenv=
|
passenv=CODACY_PROJECT_TOKEN
|
||||||
CODACY_PROJECT_TOKEN
|
|
||||||
{[base]passenv}
|
|
||||||
deps=
|
deps=
|
||||||
-r{toxinidir}/requirements-dev.txt
|
-r{toxinidir}/requirements-dev.txt
|
||||||
codacy-coverage
|
codacy-coverage
|
||||||
|
Loading…
Reference in New Issue
Block a user