Used more specific asserts in the Django test suite. 

Refs #23620.
> Or just make them a second commit here and we can squash before merging.

Done. Thanks.