Skip to content

Commit

Permalink
Update history panel tests for django 1.11.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schilling committed Mar 21, 2020
1 parent af9fc3f commit 00b439e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/panels/test_history.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from unittest.mock import patch

import django
from django.test import RequestFactory, override_settings
from django.urls import resolve, reverse

Expand Down Expand Up @@ -39,7 +40,10 @@ def test_trunc_length_setting(self):
self.request = rf.post("/", data={"foo": "bar"})
response = self.panel.process_request(self.request)
self.panel.generate_stats(self.request, response)
self.assertIn("foo…", self.panel.content)
if django.VERSION < (2, 0, 0):
self.assertIn("foo...", self.panel.content)
else:
self.assertIn("foo…", self.panel.content)
self.assertNotIn(CLEANSED_SUBSTITUTE, self.panel.content)


Expand Down

0 comments on commit 00b439e

Please sign in to comment.