Added test url definitions
This commit is contained in:
parent
8c0ededb16
commit
9e1f79b6a2
3 changed files with 21 additions and 0 deletions
6
django_client_reverse/test_urls.py
Normal file
6
django_client_reverse/test_urls.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
from django.conf.urls import include, url
|
||||||
|
from django_client_reverse.views import Reverser
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
url(r'^$', Reverser.as_view(), name="reverser")
|
||||||
|
]
|
|
@ -1,5 +1,13 @@
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
from .views import Reverser
|
from .views import Reverser
|
||||||
|
from os import environ
|
||||||
|
from . import test_urls
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^$', Reverser.as_view(), name="reverser")
|
url(r'^$', Reverser.as_view(), name="reverser")
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if environ.get('IN_URL_TEST', False):
|
||||||
|
urlpatterns += [
|
||||||
|
url(r'^tests/', include(test_urls, namespace="tests"))
|
||||||
|
]
|
||||||
|
|
7
runtests
Normal file
7
runtests
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
export IN_URL_TEST=true
|
||||||
|
|
||||||
|
manage.py test $@
|
Reference in a new issue