'PUT API should allow overwrite of existing document content'

def test_put_existing(self):

    data = dict(summary='Look,    I    made    an    edit!', content="\n                                                                <p>This    is    an    edit    to    the    page.    We've    dealt    with    it.</p>\n                                                ")
    resp = self._put(self.url, data)
    eq_(403, resp.status_code)
    resp = self._put(self.url, data, HTTP_AUTHORIZATION=self.basic_auth)
    eq_(205, resp.status_code)
    curr_d = Document.objects.get(pk=self.doc.pk)
    eq_(normalize_html(data['content'].strip()), normalize_html(Document.objects.get(pk=self.doc.pk).html))
    curr_r = curr_d.current_revision
    ok_((self.rev.pk != curr_r.pk))
    eq_(data['summary'], curr_r.summary)
    r_tags = ','.join(sorted((t.name for t in curr_r.review_tags.all())))
    eq_('editorial,technical', r_tags)
