'Check several author values, including test for (anon)'

def test_asked_by(self):

    author_vals = (('DoesNotExist', 0), ('jsocol', 2), ('pcraciunoiu', 2))
    for (name, number) in author_vals:
        u = UserFactory(username=name)
        for i in range(number):
            ques = QuestionFactory(title=u'audio', creator=u)
            ques.tags.add(u'desktop')
            ans = AnswerFactory(question=ques)
            AnswerVoteFactory(answer=ans, helpful=True)
    self.refresh()
    qs = {'a': 1, 'w': 2, 'format': 'json'}
    for (author, total) in author_vals:
        qs.update({'asked_by': author})
        response = self.client.get(reverse('search.advanced'), qs)
        eq_(total, json.loads(response.content)['total'])
