Skip to content

Commit

Permalink
fix test settings for django 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
thijstriemstra committed Aug 18, 2019
1 parent 53fa9ad commit 0c3b0d3
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 13 deletions.
3 changes: 0 additions & 3 deletions admin_appmenu/tests/requirements.txt

This file was deleted.

8 changes: 8 additions & 0 deletions admin_appmenu/tests/settings.py
Expand Up @@ -23,6 +23,7 @@
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages'
],
},
},
Expand All @@ -33,10 +34,17 @@
'django.contrib.sessions',
'django.contrib.contenttypes',
'django.contrib.admin',
'django.contrib.messages',
'django.contrib.sites',
'admin_appmenu'
]

MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware'
]

# =============================================================================
# ADMIN APPMENU
# =============================================================================
Expand Down
14 changes: 12 additions & 2 deletions setup.cfg
@@ -1,3 +1,13 @@
[flake8]
ignore = E121, E122, E123, E125, E126, E128
exclude = .tox/*, build/*, dist/*, admin_appmenu/migrations/*, admin_appmenu/tests/*
ignore = E121, E122, E123, E125, E126, E128, E402, E501
exclude =
.tox,
.eggs,
# No need to traverse our git directory
.git,
# There's no value in checking cache directories
__pycache__,
build/*,
dist/*,
admin_appmenu/migrations/*,
admin_appmenu/tests/*
19 changes: 18 additions & 1 deletion setup.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright Collab 2013-2018
# Copyright Collab 2013-2019
# See LICENSE for details.

import os
Expand All @@ -14,6 +14,12 @@
from admin_appmenu import version # flake8: noqa
sys.path.pop(0)

test_deps = [
"tox",
"coverage",
"flake8"
]

setup(
name='django-admin-appmenu',
packages=find_packages(),
Expand All @@ -24,6 +30,10 @@
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
Expand All @@ -36,6 +46,13 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
tests_require=test_deps,
extras_require={
'docs': [
'sphinx>=1.5.1'
],
'test': test_deps
},
author='Collab',
author_email='info@collab.nl',
url='http://github.com/collab-project/django-admin-appmenu',
Expand Down
14 changes: 7 additions & 7 deletions tox.ini
@@ -1,4 +1,4 @@
# Copyright Collab 2013-2018
# Copyright Collab 2013-2019
# See LICENSE for details.
#
# Tox (https://tox.testrun.org/) is a tool for running tests
Expand All @@ -17,7 +17,7 @@ skip_missing_interpreters = True


[base]
deps = -r{toxinidir}/admin_appmenu/tests/requirements.txt
deps = .[test]


[testenv]
Expand All @@ -30,10 +30,10 @@ setenv =
DJANGO_SETTINGS_MODULE=admin_appmenu.tests.settings
PYTHONPATH={toxinidir}
deps =
django-19: Django>=1.9,<1.10
django-110: Django>=1.10,<1.11
django-111: Django>=1.11,<2.0.0
django-20: Django>=2.0,<3.0.0
django-19: Django==1.9.*
django-110: Django==1.10.*
django-111: Django==1.11.*
django-20: Django==2.*
{[base]deps}


Expand All @@ -44,6 +44,6 @@ commands =
{[testenv]commands}
coveralls
deps =
Django>=1.11,<2.0.0
Django==1.11.*
coveralls
{[base]deps}

0 comments on commit 0c3b0d3

Please sign in to comment.