diff --git a/inertia/tests/test_ssr.py b/inertia/tests/test_ssr.py index 9779d68..8407f2e 100644 --- a/inertia/tests/test_ssr.py +++ b/inertia/tests/test_ssr.py @@ -1,3 +1,4 @@ +from json import dumps from inertia.test import InertiaTestCase, inertia_page, inertia_div from django.test import override_settings from unittest.mock import patch, Mock @@ -24,7 +25,8 @@ def test_it_returns_ssr_calls(self, mock_request): mock_request.post.assert_called_once_with( 'ssr-url/render', - json=inertia_page('props', props={'name': 'Brandon', 'sport': 'Hockey'}), + data=dumps(inertia_page('props', props={'name': 'Brandon', 'sport': 'Hockey'})), + headers={'Content-Type': 'application/json'} ) self.assertTemplateUsed('inertia_ssr.html') print(response.content) diff --git a/pyproject.toml b/pyproject.toml index e3906d8..dec17da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ packages = [ ] [tool.poetry.dependencies] -python = "^3.8" -django = ">=4" +python = ">=3.10" +django = "^5.0" requests = "^2" [tool.poetry.dev-dependencies]