'PUT API should handle application/json requests'

def test_put_json(self):

    slug = 'new-root-json-doc'
    url = reverse('wiki.document', args=(slug,), locale=settings.WIKI_DEFAULT_LANGUAGE)
    data = dict(title='This    is    the    title    of    a    new    page', content='\n                                                                <p>This    is    a    new    page,    hooray!</p>\n                                                ', tags='hello,quux,xyzzy', review_tags='technical')
    resp = self._put(url, json.dumps(data), content_type='application/json', HTTP_AUTHORIZATION=self.basic_auth)
    eq_(201, resp.status_code)
    new_doc = Document.objects.get(locale=settings.WIKI_DEFAULT_LANGUAGE, slug=slug)
    eq_(data['title'], new_doc.title)
    eq_(normalize_html(data['content']), normalize_html(new_doc.html))
