Skip to content

Commit

Permalink
django-5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ldynia authored and bittner committed Jan 24, 2024
1 parent 5637bcd commit c7e705b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,24 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
django-version:
- '3.2'
- '4.1'
- '4.2'
- '5.0'
exclude:
- { django-version: '3.2', python-version: '3.11' }
- { django-version: '3.2', python-version: '3.12' }
- { django-version: '4.1', python-version: '3.6' }
- { django-version: '4.1', python-version: '3.7' }
- { django-version: '4.1', python-version: '3.12' }
- { django-version: '4.2', python-version: '3.6' }
- { django-version: '4.2', python-version: '3.7' }
- { django-version: '5.0', python-version: '3.6' }
- { django-version: '5.0', python-version: '3.7' }
- { django-version: '5.0', python-version: '3.8' }
- { django-version: '5.0', python-version: '3.9' }
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Version Support
---------------

*behave-django* is `tested against`_ the officially supported combinations of
Python and Django (Django 3.2, 4.1, 4.2 on Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11).
Python and Django (Django 3.2, 4.1, 4.2, 5.0 on Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12).

*behave-django* requires a few newer features of *behave* and hence installs
a recent unreleased version of `behave`_ as a dependency.
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def read_file(filename):
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.1',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
Expand All @@ -53,6 +54,7 @@ def read_file(filename):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Testing',
Expand Down
12 changes: 6 additions & 6 deletions tests/acceptance/steps/context-urlhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,35 @@ def model_arg(context):

@then(u'it returns the value of base_url')
def is_baseurl_value(context):
context.test.assertEquals(context.result, context.base_url)
context.test.assertEqual(context.result, context.base_url)


@then(u'the result is the base_url with "{url_path}" appended')
def baseurl_plus_path(context, url_path):
context.test.assertEquals(context.result, context.base_url + url_path)
context.test.assertEqual(context.result, context.base_url + url_path)


@then(u'the result is the base_url with reverse("{view_name}") appended')
def baseurl_plus_reverse(context, view_name):
path = reverse(view_name)
assert len(path) > 0, "Non-empty path expected"
context.test.assertEquals(context.result, context.base_url + path)
context.test.assertEqual(context.result, context.base_url + path)


@then(u'the result is the base_url with model.get_absolute_url() appended')
def baseurl_plus_absolute_url(context):
path = context.model.get_absolute_url()
assert len(path) > 0, "Non-empty path expected"
context.test.assertEquals(context.result, context.base_url + path)
context.test.assertEqual(context.result, context.base_url + path)


@then(u'this returns the same result as get_url(reverse("{view_name}"))')
def explicit_reverse(context, view_name):
path = reverse(view_name)
context.test.assertEquals(context.result, context.get_url(path))
context.test.assertEqual(context.result, context.get_url(path))


@then(u'this returns the same result as get_url(model.get_absolute_url())')
def get_model_url(context):
path = context.model.get_absolute_url()
context.test.assertEquals(context.result, context.get_url(path))
context.test.assertEqual(context.result, context.get_url(path))
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ envlist =
# Python/Django combinations that are officially supported
py3{6,7,8,9,10}-django32
py3{8,9,10,11}-django41
py3{8,9,10,11}-django42
py3{8,9,10,11,12}-django42
py3{10,11,12}-django50
behave-latest
package
docs
Expand All @@ -24,12 +25,14 @@ python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[gh-actions:env]
DJANGO =
3.2: django32
4.1: django41
4.2: django42
5.0: django50

[testenv]
description = Unit tests
Expand All @@ -38,6 +41,7 @@ deps =
django32: Django>=3.2,<4.0
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
latest: Django
latest: git+https://github.com/behave/behave.git#egg=behave
pytest
Expand Down

0 comments on commit c7e705b

Please sign in to comment.