From 9c5ab4facf12071fc661a7b9653be30b30a4e698 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 27 Feb 2017 18:42:15 +0000 Subject: [PATCH] Add assertTagInTemplateScript test helper function This asserts that a tag exists within a + +

not in a script tag

+ """ + + self.assertTagInTemplateScript('

', haystack) + self.assertTagInTemplateScript('

', haystack, count=2) + + with self.assertRaises(AssertionError): + self.assertTagInTemplateScript('

', haystack) + class TestWagtailPageTests(WagtailPageTests): def setUp(self):