Skip to content

Commit

Permalink
updated docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubMastalerz committed Nov 30, 2023
1 parent 893e6d4 commit 8d2c177
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Fixed

- Fixed `test_src_set_invalid_format` not working with Wagtail 5.2 and above. ([#378](https://github.com/torchbox/wagtail-grapple/pull/378)) @JakubMastalerz
- `test_src_set_invalid_format` not working with Wagtail 5.2 and above. ([#378](https://github.com/torchbox/wagtail-grapple/pull/378)) @JakubMastalerz

## [0.23.0] - 2023-09-29

Expand Down
16 changes: 14 additions & 2 deletions tests/test_image_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,15 @@ def test_src_set_with_format(self):

@skipIf(
WAGTAIL_VERSION >= (5, 2),
"Wagtail 5.2 introduced changes to this error message.",
"Exception message is different in Wagtail 5.2+",
)
def test_src_set_invalid_format_wagtail_below_5_2(self):
"""
Ensure that an exception is raised when image format is not of valid type.
Works with Wagtail versions below 5.2. For versions 5.2 and above see:
`test_src_set_invalid_format_wagtail_above_5_2`.
"""

query = """
query ($id: ID!) {
image(id: $id) {
Expand All @@ -171,9 +177,15 @@ def test_src_set_invalid_format_wagtail_below_5_2(self):

@skipIf(
WAGTAIL_VERSION < (5, 2),
"Wagtail 5.2 introduced changes to this error message.",
"Exception message is different in Wagtail verions below 5.2",
)
def test_src_set_invalid_format_wagtail_above_5_2(self):
"""
Ensure that an exception is raised when image format is not of valid type.
Works with Wagtail versions 5.2 and above. For versions below 5.2 see:
`test_src_set_invalid_format_wagtail_below_5_2`.
"""

query = """
query ($id: ID!) {
image(id: $id) {
Expand Down

0 comments on commit 8d2c177

Please sign in to comment.