'Incorrect PUT requests in HTML should include a form error.'

def test_put_error_instance_view(self):

    data = {u'text': (u'foobar' * 100)}
    request = factory.put(u'/', data, HTTP_ACCEPT=u'text/html')
    response = self.view(request, pk=1).render()
    expected_error = u'<span    class="help-block">Ensure    this    field    has    no    more    than    100    characters.</span>'
    assert (expected_error in response.rendered_content.decode(u'utf-8'))
