'Revisions modified by PUT API should track the auth key used'

def test_put_track_authkey(self):

    slug = 'new-root-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, data, HTTP_AUTHORIZATION=self.basic_auth)
    eq_(201, resp.status_code)
    last_log = self.key.history.order_by('-pk').all()[0]
    eq_('created', last_log.action)
    data['title'] = 'New    title    for    old    page'
    resp = self._put(url, data, HTTP_AUTHORIZATION=self.basic_auth)
    eq_(205, resp.status_code)
    last_log = self.key.history.order_by('-pk').all()[0]
    eq_('updated', last_log.action)
