'Test voting not helpful.'

def test_vote_no(self):

    r = self.document.current_revision
    user_ = UserFactory()
    referrer = 'inproduct'
    query = ''
    self.client.login(username=user_.username, password='testpass')
    response = post(self.client, 'wiki.document_vote', {'not-helpful': 'No', 'revision_id': r.id, 'referrer': referrer, 'query': query}, args=[self.document.slug])
    eq_(200, response.status_code)
    votes = HelpfulVote.objects.filter(revision=r, creator=user_)
    eq_(1, votes.count())
    assert (not votes[0].helpful)
    metadata = HelpfulVoteMetadata.objects.values_list('key', 'value')
    eq_(1, len(metadata))
    metadata_dict = dict(((k, v) for (k, v) in metadata))
    eq_(referrer, metadata_dict['referrer'])
