Skip to content

Commit a5a6c2f

Browse files
committed
add more model tests
1 parent 5fb7e55 commit a5a6c2f

File tree

3 files changed

+551
-7
lines changed

3 files changed

+551
-7
lines changed

run_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def run():
1212
django.setup()
1313
TestRunner = get_runner(settings)
1414
test_runner = TestRunner()
15-
failures = test_runner.run_tests(["tests"])
15+
failures = test_runner.run_tests(sys.argv[1:] or ["tests"])
1616
sys.exit(bool(failures))
1717

1818

tests/test_ajax_plugin.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def test_plugin_instance_not_found(self):
6565
with self.assertRaises(Http404):
6666
AjaxView.plugin_instance(99999)
6767

68+
@skipIf(cms_version < "4", "Form rendering tests require django CMS 4 or higher")
6869
def test_dispatch_with_json_accept_header_post(self):
6970
"""Test dispatch routes to ajax_post for JSON POST requests"""
7071
form_plugin = add_plugin(
@@ -102,11 +103,6 @@ def test_dispatch_with_json_accept_header_post(self):
102103
self.assertEqual(response.status_code, 200)
103104
self.assertIsInstance(response, JsonResponse)
104105

105-
def test_dispatch_with_json_accept_header_get(self):
106-
"""Test dispatch routes to ajax_get for JSON GET requests"""
107-
# Skip this test as GET requests need special handling in the plugin
108-
self.skipTest("AJAX GET requires more complex setup with context data")
109-
110106

111107
@skipIf(cms_version < "4", "Form rendering tests require django CMS 4 or higher")
112108
class AjaxFormSubmissionTestCase(TestFixture, CMSTestCase):

0 commit comments

Comments
 (0)