diff options
| author | Adam Zapletal <adamzap@gmail.com> | 2016-08-31 19:41:34 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-08-31 20:41:34 -0400 |
| commit | ca2ccf54ffa95cf001260b917dd267fda60e93d5 (patch) | |
| tree | 3efce67af87aeeb137b7c13b707ff90c2cff1a31 /django | |
| parent | ff1e7b4eb43737bf2752197036663cee58922317 (diff) | |
Fixed #24112 -- Fixed assertInHTML()'s counting if needle has no root element.
Diffstat (limited to 'django')
| -rw-r--r-- | django/test/html.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/test/html.py b/django/test/html.py index 84f4862693..195c61ede0 100644 --- a/django/test/html.py +++ b/django/test/html.py @@ -94,6 +94,9 @@ class Element(object): if not isinstance(element, six.string_types): if self == element: return 1 + if isinstance(element, RootElement): + if self.children == element.children: + return 1 i = 0 for child in self.children: # child is text content and element is also text content, then |
