File tree 5 files changed +117
-35
lines changed
5 files changed +117
-35
lines changed Original file line number Diff line number Diff line change 1
1
# Config file for automatic testing at travis-ci.org
2
2
dist : xenial
3
3
language : python
4
-
4
+ cache : pip
5
5
sudo : false
6
- python :
7
- - " 3.7"
8
- - " 3.6"
9
- - " 3.5"
10
- - " 3.4"
11
- - " 2.7"
12
- env :
13
- - DJANGO="Django>=2.1,<2.2"
14
- - DJANGO="Django>=2.0,<2.1"
15
- - DJANGO="Django>=1.11,<1.12"
16
- - DJANGO="https://github.com/django/django/archive/master.tar.gz"
17
- before_install :
18
- - pip install -q $DJANGO coveralls
6
+
7
+ matrix :
8
+ include :
9
+ - env : TOXENV=py34-dj111
10
+ python : 3.4
11
+ - env : TOXENV=py34-dj2
12
+ python : 3.4
13
+ - env : TOXENV=py35-dj111
14
+ python : 3.5
15
+ - env : TOXENV=py35-dj2
16
+ python : 3.5
17
+ - env : TOXENV=py35-dj21
18
+ python : 3.5
19
+ - env : TOXENV=py35-dj22
20
+ python : 3.5
21
+ - env : TOXENV=py36-dj111
22
+ python : 3.6
23
+ - env : TOXENV=py36-dj2
24
+ python : 3.6
25
+ - env : TOXENV=py36-dj21
26
+ python : 3.6
27
+ - env : TOXENV=py36-dj22
28
+ python : 3.6
29
+ - env : TOXENV=py36-dj3
30
+ python : 3.6
31
+ - env : TOXENV=py37-dj2
32
+ python : 3.7
33
+ - env : TOXENV=py37-dj21
34
+ python : 3.7
35
+ - env : TOXENV=py37-dj22
36
+ python : 3.7
37
+ - env : TOXENV=py37-dj3
38
+ python : 3.7
39
+ - env : TOXENV=py38-dj22
40
+ python : 3.8
41
+ - env : TOXENV=py38-dj3
42
+ python : 3.8
43
+
19
44
install :
20
- - python setup.py develop
45
+ - pip install tox
46
+
21
47
script :
22
- - python setup.py test
23
- after_success :
24
- - coveralls
25
- matrix :
26
- exclude :
27
- - python : " 3.4"
28
- env : DJANGO="Django>=2.1,<2.2"
29
- - python : " 2.7"
30
- env : DJANGO="Django>=2.1,<2.2"
31
- - python : " 2.7"
32
- env : DJANGO="Django>=2.0,<2.1"
33
- - python : " 2.7"
34
- env : DJANGO="https://github.com/django/django/archive/master.tar.gz"
35
- allow_failures :
36
- - env : DJANGO="https://github.com/django/django/archive/master.tar.gz"
48
+ - tox
Original file line number Diff line number Diff line change
1
+ #!test/usr/bin/env python
2
+ import os
3
+ import sys
4
+
5
+ from django .core .management import execute_from_command_line
6
+
7
+ os .environ ['DJANGO_SETTINGS_MODULE' ] = 'test_settings'
8
+
9
+
10
+ def runtests ():
11
+
12
+ argv = [sys .argv [0 ], 'test' ]
13
+ return execute_from_command_line (argv )
14
+
15
+
16
+ if __name__ == '__main__' :
17
+ sys .exit (runtests ())
Original file line number Diff line number Diff line change @@ -46,11 +46,6 @@ def find_version(*parts):
46
46
packages = find_packages (exclude = ('example*' , '*.tests*' )),
47
47
include_package_data = True ,
48
48
49
- tests_require = [
50
- 'django-setuptest' ,
51
- ],
52
- test_suite = 'setuptest.setuptest.SetupTestSuite' ,
53
-
54
49
zip_safe = False ,
55
50
classifiers = [
56
51
'Development Status :: 5 - Production/Stable' ,
Original file line number Diff line number Diff line change 1
1
import os , re
2
2
3
+ SECRET_KEY = 'DUMMY_SECRET_KEY'
4
+
5
+ TEMPLATES = [
6
+ {
7
+ 'BACKEND' : 'django.template.backends.django.DjangoTemplates' ,
8
+ 'DIRS' : [
9
+ ],
10
+ 'APP_DIRS' : True ,
11
+ 'OPTIONS' : {
12
+ 'context_processors' : [
13
+ 'django.contrib.auth.context_processors.auth' ,
14
+ 'django.template.context_processors.debug' ,
15
+ 'django.template.context_processors.i18n' ,
16
+ 'django.template.context_processors.media' ,
17
+ 'django.template.context_processors.static' ,
18
+ 'django.template.context_processors.tz' ,
19
+ 'django.contrib.messages.context_processors.messages' ,
20
+ ],
21
+ },
22
+ },
23
+ ]
24
+
3
25
DATABASES = {
4
26
'default' : {
5
27
'ENGINE' : 'django.db.backends.sqlite3' ,
12
34
'django.contrib.admin' ,
13
35
'django.contrib.sessions' ,
14
36
'django.contrib.contenttypes' ,
37
+ 'django.contrib.messages' ,
15
38
'django.contrib.sites' ,
16
39
17
40
'maintenancemode' ,
20
43
MIDDLEWARE = (
21
44
'django.contrib.sessions.middleware.SessionMiddleware' ,
22
45
'django.contrib.auth.middleware.AuthenticationMiddleware' ,
46
+ 'django.contrib.messages.middleware.MessageMiddleware' ,
23
47
24
48
'maintenancemode.middleware.MaintenanceModeMiddleware' ,
25
49
)
Original file line number Diff line number Diff line change
1
+ [tox]
2
+ skipsdist = True
3
+ usedevelop = True
4
+ toxworkdir = ../toxworkdir/django-maintenance/.tox
5
+
6
+ envlist =
7
+ ; py34
8
+ py34-dj{111,2}
9
+ ; py35
10
+ py35-dj{111,2,21,22}
11
+ ; py36
12
+ py36-dj{111,2,21,22,3}
13
+ ; py37
14
+ py37-dj{111,2,21,22,3}
15
+ ; py38
16
+ py38-dj{22,3}
17
+
18
+ [testenv]
19
+ install_command = pip install -e . -U {opts} {packages}
20
+ commands = python runtests.py
21
+
22
+ basepython =
23
+ py34: python3.4
24
+ py35: python3.5
25
+ py36: python3.6
26
+ py37: python3.7
27
+ py38: python3.8
28
+
29
+ deps =
30
+ dj111: Django>=1.11,<2.0
31
+ dj2: Django>=2.0,<2.1
32
+ dj21: Django>=2.1,<2.2
33
+ dj22: Django>=2.2,<3.0
34
+ dj3: Django>=3.0,<3.1
You can’t perform that action at this time.
0 commit comments