Skip to content
Extraits de code Groupes Projets
Valider 01043374 rédigé par Yohan Boniface's avatar Yohan Boniface
Parcourir les fichiers

Add travis.yml

parent e29ead1f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
sudo: false
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
services:
- postgresql
env:
- UMAP_SETTINGS=umap/tests/settings.py
install:
- pip install .
- pip install -r requirements-dev.txt
script: make test
notifications:
irc:
channels:
- "irc.freenode.net#umap"
on_success: change
on_failure: always
email: false
branches:
only:
- master
......@@ -2,7 +2,7 @@
# uMap project
[![Requirements Status](https://requires.io/github/umap-project/umap/requirements.svg?branch=master)](https://requires.io/github/umap-project/umap/requirements/?branch=master)
[![Join the chat at https://gitter.im/umap-project/umap](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/umap-project/umap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Documentation Status](https://readthedocs.org/projects/umap-project/badge/?version=latest)](http://umap-project.readthedocs.io/en/latest/?badge=latest)
[![Join the chat at https://gitter.im/umap-project/umap](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/umap-project/umap?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Documentation Status](https://readthedocs.org/projects/umap-project/badge/?version=latest)](http://umap-project.readthedocs.io/en/latest/?badge=latest)[![Build Status](https://travis-ci.org/umap-project/umap.svg?branch=master)](https://travis-ci.org/umap-project/umap)
## About
......
[pytest]
DJANGO_SETTINGS_MODULE=umap.settings.local
DJANGO_SETTINGS_MODULE=umap.settings
pytest
pytest-django
mkdocs
pytest==3.0.7
pytest-django==3.1.2
mkdocs==0.16.3
......@@ -168,6 +168,12 @@ MAP_SHORT_URL_NAME = "umap_short_url"
UMAP_USE_UNACCENT = False
UMAP_FEEDBACK_LINK = "https://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help" # noqa
USER_MAPS_URL = 'user_maps'
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'umap',
}
}
# =============================================================================
# Third party app settings
......
from umap.settings.base import * # pylint: disable=W0614,W0401
SECRET_KEY = 'justfortests'
import json
import mimetypes
import re
import socket
try:
......@@ -30,6 +31,13 @@ from leaflet_storage.forms import DEFAULT_CENTER
User = get_user_model()
PRIVATE_IP = re.compile(r'((^127\.)|(^10\.)'
r'|(^172\.1[6-9]\.)'
r'|(^172\.2[0-9]\.)'
r'|(^172\.3[0-1]\.)'
r'|(^192\.168\.))')
class PaginatorMixin(object):
per_page = 5
......@@ -229,8 +237,7 @@ def validate_url(request):
ipaddress = socket.gethostbyname(toproxy.hostname)
except:
raise AssertionError()
assert not ipaddress.startswith('127.')
assert not ipaddress.startswith('192.168.')
assert not PRIVATE_IP.match(ipaddress)
return url
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter