-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from valberg/fix_tests_for_django_4.0
Fix tests
- Loading branch information
Showing
8 changed files
with
23 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
default_app_config = 'invitations.apps.Config' | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
Django>=1.1.* | ||
coverage==4.5.4 | ||
flake8==3.7.9 | ||
freezegun==0.3.12 | ||
mock==3.0.5 | ||
pytest==5.2.2 | ||
pytest-django==3.6.0 | ||
pytest-cov==2.8.1 | ||
tox==3.14.0 | ||
Django>=3.2.* | ||
coverage==6.3.2 | ||
flake8==4.0.1 | ||
freezegun==1.2. | ||
pytest==7.1.1 | ||
pytest-django==4.5.2 | ||
pytest-cov==3.0.0 | ||
tox==3.24.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,7 @@ | |
description='Generic invitations app with support for django-allauth', | ||
author='https://github.com/bee-keeper', | ||
author_email='[email protected]', | ||
url='https://github.com/bee-keeper/django-invitations.git', | ||
download_url='https://github.com/' | ||
'bee-keeper/django-invitations/tarball/1.9.3', | ||
url='https://github.com/jazzband/django-invitations.git', | ||
keywords=['django', 'invitation', 'django-allauth', 'invite'], | ||
license='GPL-3.0-only', | ||
classifiers=[ | ||
|
@@ -21,11 +19,13 @@ | |
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Environment :: Web Environment', | ||
'Topic :: Internet', | ||
'Framework:: Django:: 3.2', | ||
'Framework:: Django:: 4.0', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'License :: OSI Approved :: GPL-3.0-only', | ||
'Framework :: Django', | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
from django.conf.urls import url, include | ||
from django.urls import path, include | ||
from django.contrib import admin | ||
from django.conf import settings | ||
|
||
admin.autodiscover() | ||
|
||
urlpatterns = [ | ||
url(r'^invitations/', include('invitations.urls')), | ||
url(r'^admin/', admin.site.urls), | ||
path('invitations/', include('invitations.urls')), | ||
path('admin/', admin.site.urls), | ||
] | ||
|
||
if 'allauth' in settings.INSTALLED_APPS: | ||
urlpatterns.append( | ||
url(r'^accounts/', include('allauth.urls')) | ||
path('accounts/', include('allauth.urls')) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import datetime | ||
import re | ||
import json | ||
from mock import patch | ||
from unittest.mock import patch | ||
|
||
from django.test import Client | ||
from django.test.client import RequestFactory | ||
|
@@ -109,7 +109,7 @@ def test_valid_form_submission(self, user_a): | |
assert mail.outbox[0].to[0] == '[email protected]' | ||
assert 'Invitation to join example.com' in mail.outbox[0].subject | ||
url = re.search( | ||
"(?P<url>/invitations/[^\s]+)", mail.outbox[0].body).group("url") | ||
r"(?P<url>/invitations/[^\s]+)", mail.outbox[0].body).group("url") | ||
assert url == reverse( | ||
'invitations:accept-invite', kwargs={'key': invitation.key}) | ||
|
||
|
@@ -131,7 +131,7 @@ def test_valid_form_submission_with_swapped_model(self, user_a): | |
assert mail.outbox[0].to[0] == '[email protected]' | ||
assert 'Invitation to join example.com' in mail.outbox[0].subject | ||
url = re.search( | ||
"(?P<url>/invitations/[^\s]+)", mail.outbox[0].body).group("url") | ||
r"(?P<url>/invitations/[^\s]+)", mail.outbox[0].body).group("url") | ||
assert url == reverse( | ||
'invitations:accept-invite', kwargs={'key': invitation.key}) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters