The context is an implementation detail that isn't obvious at all if you only have a passing familiarity with Django's templating stuff and it doesn't guarantee that the thing you're checking will be rendered at all. Checking in the rendered text is a little messier, but it's asserting on what's actually being shown to the client.