Skip to content

Commit

Permalink
Add test app (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
allcaps authored Jun 19, 2024
1 parent 5d2e346 commit ae68ecb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import pytest

from wagtail_translate.apps import patch_needed


@pytest.mark.parametrize(
"version, expected",
[
((5, 1, 0), True),
((5, 2, 0), True),
((5, 3, 0), True),
((6, 1, 0), True),
((6, 1, 9), True),
((6, 2, 0), False), # 6.2 introduces the `copy_for_translation_done` signal.
((6, 2, 1), False),
((6, 3, 0), False),
],
)
def test_patch_needed(version, expected):
assert patch_needed(version) is expected

0 comments on commit ae68ecb

Please sign in to comment.