diff --git a/allies/tests.py b/allies/tests.py index 3c7605cb4..f5a6284ea 100644 --- a/allies/tests.py +++ b/allies/tests.py @@ -3,10 +3,10 @@ from allies.models import AllySubject, Ally from snippets.models import Subject -from wagtail.test.utils import WagtailTestUtils, WagtailPageTests +from wagtail.test.utils import WagtailTestUtils, WagtailPageTestCase -class AlliesTests(WagtailPageTests): +class AlliesTests(WagtailPageTestCase): def setUp(self): self.math = Subject(name="Math", page_content="Math page content.", seo_title="Math SEO Title", search_description="Math page description.") @@ -42,8 +42,5 @@ def test_can_create_ally_subject(self): self.assertEquals('Math', result.get_subject_name()) def test_can_create_ally(self): - #ally_subject = AllySubject(subject=self.math, ally=self.ally) - #ally_subject.save() result = Ally.objects.all()[0] - #print('ally subject: ' + str(result)) self.assertEquals('Ally Heading', result.heading) diff --git a/books/tests.py b/books/tests.py index dbab26d59..ebfc185ef 100644 --- a/books/tests.py +++ b/books/tests.py @@ -1,6 +1,6 @@ import vcr -from wagtail.test.utils import WagtailPageTests +from wagtail.test.utils import WagtailPageTestCase from wagtail.models import Page import snippets.models @@ -14,7 +14,7 @@ import datetime -class BookTests(WagtailPageTests): +class BookTests(WagtailPageTestCase): def setUp(self): self.client = Client() diff --git a/news/tests.py b/news/tests.py index ad0547b5e..49c0a4da3 100644 --- a/news/tests.py +++ b/news/tests.py @@ -3,7 +3,7 @@ from django.utils import timezone from django.test import TestCase -from wagtail.test.utils import WagtailPageTests +from wagtail.test.utils import WagtailPageTestCase from wagtail.models import Page from pages.models import HomePage from shared.test_utilities import assertPathDoesNotRedirectToTrailingSlash @@ -12,7 +12,7 @@ from snippets.models import Subject, BlogContentType, BlogCollection -class NewsTests(WagtailPageTests, TestCase): +class NewsTests(WagtailPageTestCase, TestCase): def setUp(self): # create collections self.learning = BlogCollection(name='Teaching and Learning', description='this is a collection') @@ -258,7 +258,7 @@ def test_search_blog_collection_and_two_subjects(self): self.assertContains(response, 'Math') -class PressTests(WagtailPageTests): +class PressTests(WagtailPageTestCase): def setUp(self): press_index = PressIndex.objects.all()[0] self.press_release = PressRelease(title='Press release', diff --git a/oxmenus/tests.py b/oxmenus/tests.py index 3c38f44fa..cbdbde51d 100644 --- a/oxmenus/tests.py +++ b/oxmenus/tests.py @@ -1,11 +1,11 @@ import json from django.test import TestCase -from wagtail.test.utils import WagtailPageTests +from wagtail.test.utils import WagtailPageTestCase from oxmenus.models import Menus -class OXMenuTests(WagtailPageTests, TestCase): +class OXMenuTests(WagtailPageTestCase, TestCase): def setUp(self): oxmenu = Menus(name="What we do", menu=json.dumps( diff --git a/pages/tests.py b/pages/tests.py index 9e83a604a..f73cd218e 100644 --- a/pages/tests.py +++ b/pages/tests.py @@ -3,7 +3,7 @@ from django.test import TestCase, Client from django.core.management import call_command -from wagtail.test.utils import WagtailTestUtils, WagtailPageTests +from wagtail.test.utils import WagtailTestUtils, WagtailPageTestCase from wagtail.models import Page from pages.models import (HomePage, ContactUs, @@ -44,7 +44,7 @@ from shared.test_utilities import assertPathDoesNotRedirectToTrailingSlash, mock_user_login from http import cookies -class HomePageTests(WagtailPageTests): +class HomePageTests(WagtailPageTestCase): def setUp(self): mock_user_login() @@ -105,7 +105,7 @@ def test_allowed_subpages(self): Assignable, }) -class PageTests(WagtailPageTests): +class PageTests(WagtailPageTestCase): def setUp(self): mock_user_login() root_page = Page.objects.get(title="Root") @@ -496,7 +496,7 @@ def test_can_create_assignable_page(self): self.assertEqual(retrieved_page.title, "Assignable Page") -class ErrataListTest(WagtailPageTests): +class ErrataListTest(WagtailPageTestCase): def setUp(self): mock_user_login() @@ -521,7 +521,7 @@ def test_can_create_errata_list_page(self): self.assertEqual(retrieved_page.title, "Errata List Template") -class SubjectsPageTest(WagtailPageTests): +class SubjectsPageTest(WagtailPageTestCase): def setUp(self): mock_user_login() @@ -543,7 +543,7 @@ def test_can_create_subjects_page(self): self.assertEqual(retrieved_page.title, "Subjects") -class SubjectPageTest(WagtailPageTests): +class SubjectPageTest(WagtailPageTestCase): def setUp(self): mock_user_login() diff --git a/requirements/base.txt b/requirements/base.txt index 94257972a..089c8e2bd 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -9,9 +9,10 @@ django-import-export==2.8.0 django-libsass==0.9 django-rest-auth==0.9.5 django-reversion==5.0.0 +djangorestframework==3.14.0 django-ses==3.0.1 django-storages==1.12.3 -django-taggit>=3.0.0 +django-taggit>=3.1.0 future==0.18.2 html2text==2020.1.16 # used in news feed jsonfield==3.1.0 @@ -19,7 +20,7 @@ mapbox==0.18.1 MarkupPy==1.14 odfpy==1.4.1 openpyxl==3.0.10 -psycopg2>=2.9.5 +psycopg2>=2.9.9 pycryptodome==3.14.1 # for using the SSO cookie from accounts PyJWE==1.0.0 sentry-sdk @@ -30,7 +31,7 @@ ua_parser==0.16.1 unicodecsv==0.14.1 Unidecode==1.3.4 vcrpy==4.1.1 # for recording test interactions with third-party APIs -wagtail==4.0.4 +wagtail==4.1.9 Wand==0.6.7 # for supporting animated gifs whitenoise==6.1.0 xlrd==2.0.1 diff --git a/salesforce/tests.py b/salesforce/tests.py index ced83cf9a..51dc553bd 100644 --- a/salesforce/tests.py +++ b/salesforce/tests.py @@ -22,7 +22,7 @@ from rest_framework.test import APITestCase from rest_framework.test import APIRequestFactory -from wagtail.test.utils import WagtailPageTests +from wagtail.test.utils import WagtailPageTestCase from wagtail.models import Page from wagtail.documents.models import Document @@ -103,7 +103,7 @@ def test_all_partners_no_reviews(self): # self.assertEqual(response.data['status'], 'Deleted') -class SalesforceTest(LiveServerTestCase, WagtailPageTests): +class SalesforceTest(LiveServerTestCase, WagtailPageTestCase): def setUp(self): mock_user_login() diff --git a/snippets/migrations/0031_merge_20231101_1313.py b/snippets/migrations/0031_merge_20231101_1313.py new file mode 100644 index 000000000..7c337c735 --- /dev/null +++ b/snippets/migrations/0031_merge_20231101_1313.py @@ -0,0 +1,14 @@ +# Generated by Django 4.1.7 on 2023-11-01 18:13 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('snippets', '0030_alter_erratacontent_book_state'), + ('snippets', '0030_amazonbookblurb'), + ] + + operations = [ + ] diff --git a/webinars/tests.py b/webinars/tests.py index 86f8feda6..72e550ff5 100644 --- a/webinars/tests.py +++ b/webinars/tests.py @@ -2,13 +2,13 @@ from django.test import TestCase from django.utils import timezone -from wagtail.test.utils import WagtailPageTests +from wagtail.test.utils import WagtailPageTestCase from snippets.models import Subject, WebinarCollection from webinars.models import Webinar -class WebinarTests(WagtailPageTests, TestCase): +class WebinarTests(WagtailPageTestCase, TestCase): def setUp(self): # create subjects self.math = Subject(name="Math", page_content="Math page content.", seo_title="Math SEO Title",