Skip to content

Commit

Permalink
Fix nightly test for Wagtail 6.3 / Django 5.1 (#250)
Browse files Browse the repository at this point in the history
* Bump Postgres to version 15 in nightly test script
* assertQuerysetEqual -> assertQuerySetEqual for Django 5.x compatibility
* Add include-hidden-files: true
  • Loading branch information
gasman authored Nov 4, 2024
1 parent fa6177f commit 7134319
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

services:
postgres:
image: postgres:12.7
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
ports:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
name: coverage-data
path: .coverage.*
if-no-files-found: ignore
include-hidden-files: true
retention-days: 1

coverage:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ def test_media_block_get_form_state(self):
def test_abstract_media_block_queryset(self):
block = AbstractMediaChooserBlock()

self.assertQuerysetEqual(
self.assertQuerySetEqual(
block.field.queryset.order_by("pk"),
Media.objects.order_by("pk"),
)

block = AbstractMediaChooserBlock(media_type="audio")
self.assertQuerysetEqual(
self.assertQuerySetEqual(
block.field.queryset.order_by("pk"),
Media.objects.filter(type="audio").order_by("pk"),
)

block = AbstractMediaChooserBlock(media_type="subspace-transmission")
self.assertQuerysetEqual(block.field.queryset, Media.objects.none())
self.assertQuerySetEqual(block.field.queryset, Media.objects.none())

def test_audio_chooser_block_type(self):
block = AudioChooserBlock()
Expand Down

0 comments on commit 7134319

Please sign in to comment.