﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34658	New assertion `assertNotInHTML`, like `assertContains` has `assertNotContains`	Thibaud Colas	Nicolas Lupien	"Django’s test assertions have `assertContains` and `assertNotContains` which are HTML-aware ways to check what’s inside a response, similar to Python’s `assertIn` and `assertNotIn`. Django also offers `assertInHTML` – but there is no `assertNotInHTML`.

This is very straightforward to implement – and I suspect more than a few projects will already have their own implementation if they need this, but I think it’d make much more sense to have this out of the box considering other ""<needle> in <haystack>"" assertions have their `-not` equivalent built in. For me, the main source of pain here is that I use this often enough to use this but rarely enough to frequently forget:

- Whether this is a Django built-in or not. So I look at [https://docs.djangoproject.com/en/4.2/topics/testing/tools/#assertions assertions docs] and am surprised not to see it.
- Whether the project I work on has it or not. So again I have to look around and potentially add it."	New feature	closed	Testing framework		Normal	fixed	testcases, unit tests, HTML, assertions, testing	Lemuel Sta Ana Nicolas Lupien	Ready for checkin	1	0	0	0	0	0
