Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused import patterns, fix project for Django > 1.8 #13

Merged
merged 6 commits into from May 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .travis.yml
@@ -0,0 +1,8 @@
sudo: false
language: python
python:
- "3.5"
install:
- pip install tox-travis
script:
- tox
6 changes: 1 addition & 5 deletions django_jasmine/urls.py
@@ -1,10 +1,6 @@
import os
import django

if django.VERSION >= (1, 5):
from django.conf.urls import patterns, url
else:
from django.conf.urls import url
from django.conf.urls import url
from django.conf import settings
from django.views.static import serve

Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
@@ -1,7 +1,6 @@
"""Minimal settings needed for tests."""

import os

path_to_repo = os.path.dirname((os.path.dirname(os.path.abspath(__file__))))

def pytest_configure():
Expand All @@ -20,6 +19,10 @@ def pytest_configure():
'django.contrib.contenttypes',
'django.contrib.auth',
),
TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
}],
)

import django
Expand Down
7 changes: 6 additions & 1 deletion tests/test_view.py
@@ -1,5 +1,10 @@
from django.test import TestCase
from django.core.urlresolvers import reverse
import django

if django.VERSION >= (1, 10):
from django.urls import reverse
else:
from django.core.urlresolvers import reverse

from django_jasmine import settings as dj_jas_settings

Expand Down
6 changes: 3 additions & 3 deletions tests/urls.py
@@ -1,7 +1,7 @@
"""Setup url to run tests."""

from django.conf.urls import patterns, include, url
from django.conf.urls import include, url

urlpatterns = patterns('',
urlpatterns = [
url(r'^/', include("django_jasmine.urls"))
)
]
4 changes: 3 additions & 1 deletion tox.ini
@@ -1,10 +1,12 @@
[tox]
envlist = {py27,py34,py35}-django{18,19}
envlist = {py27,py34,py35}-django{18,19,110,111}

[testenv]
deps =
pytest
pytest-django
django18: Django==1.8.10
django19: Django==1.9.3
django110: Django==1.10.4
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the latest Django version also: 1.11.1 I believe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I havent personally tried it with Django=1.11.1. Let me get travis run it on 1.10.4, and if that goes green - will add for sure.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a branch that takes care of most it if you want to add 1.11.1 and change the base to develop we can merge it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to fix the issues with 1.10 now. Looks like some reverse imports from somewhere else post 1.10.

django111: Django==1.11.1
commands = py.test {posargs}