Skip to content

Commit 6fd5f6d

Browse files
authored
Update test dependencies (#7)
* Remove python 2.7 from tox configuration * Update travis config to only run specified tox tests * Use pytest directly to test * Removed deprecated USE_L10N setting * Use pytest-django for tests
1 parent a01dd5e commit 6fd5f6d

File tree

3 files changed

+13
-60
lines changed

3 files changed

+13
-60
lines changed

.circleci/config.yml

+4-26
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,17 @@ orbs:
33
python: circleci/python@1.5.0
44

55
jobs:
6-
build-and-test-py-27-django-1-8:
6+
build-and-test-py-311-django-4-1:
77
docker:
8-
- image: cimg/python:3.9.0
8+
- image: cimg/python:3.11.0
99
steps:
1010
- checkout
1111
- python/install-packages:
1212
pkg-manager: pip
1313
- run:
1414
name: Run tests
15-
command: pip install tox && tox -e py27-django1.8
16-
build-and-test-py-27-django-1-11:
17-
docker:
18-
- image: cimg/python:3.9.0
19-
steps:
20-
- checkout
21-
- python/install-packages:
22-
pkg-manager: pip
23-
- run:
24-
name: Run tests
25-
command: pip install tox && tox -e py27-django1.11
26-
build-and-test-py-39-django-2-1:
27-
docker:
28-
- image: cimg/python:3.9.0
29-
steps:
30-
- checkout
31-
- python/install-packages:
32-
pkg-manager: pip
33-
- run:
34-
name: Run tests
35-
command: pip install tox && tox -e py39-django2.1
15+
command: pip install tox && tox -e py311-django4.1
3616
workflows:
3717
sample:
3818
jobs:
39-
- build-and-test-py-27-django-1-8
40-
- build-and-test-py-27-django-1-11
41-
- build-and-test-py-39-django-2-1
19+
- build-and-test-py-311-django-4-1

tests/settings.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# SECURITY WARNING: don't run with debug turned on in production!
2727
DEBUG = True
2828

29-
ALLOWED_HOSTS = []
29+
ALLOWED_HOSTS = ['testserver']
3030

3131

3232
# Application definition
@@ -111,8 +111,6 @@
111111

112112
USE_I18N = True
113113

114-
USE_L10N = True
115-
116114
USE_TZ = True
117115

118116

tox.ini

+8-31
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
[tox]
22
envlist =
3-
py27-django1.8,
4-
py27-django1.11,
5-
py39-django2.1
6-
7-
[django1.8]
8-
deps =
9-
Django>=1.8,<1.9
10-
11-
[django1.11]
12-
deps =
13-
Django>=1.11,<2.0
14-
15-
[django2.1]
16-
deps =
17-
Django>=2.1,<2.2
3+
py311-django4.1
184

195
[testenv]
206
passenv =
@@ -30,20 +16,11 @@ passenv =
3016
LNM_PHONE_NUMBER
3117
B2C_PHONE_NUMBER
3218

33-
commands =
34-
python {toxinidir}/setup.py test
35-
36-
[testenv:py27-django1.8]
37-
basepython = python2.7
38-
deps =
39-
{[django1.8]deps}
40-
41-
[testenv:py27-django1.11]
42-
basepython = python2.7
43-
deps =
44-
{[django1.11]deps}
45-
46-
[testenv:py39-django2.1]
47-
basepython = python3.9
19+
[testenv:py311-django4.1]
20+
description = Use Python 3.11 and Django 4.1 in a virtual environment and run tests against it.
21+
basepython = python3.11
4822
deps =
49-
{[django2.1]deps}
23+
Django>=4.1,<4.2
24+
pytest-django>=4
25+
pytest-sugar
26+
commands = pytest tests {posargs}

0 commit comments

Comments
 (0)