'Tests advanced search for questions num_votes filter'

def test_questions_num_votes(self):

    q = QuestionFactory(title=u'tags    tags    tags')
    QuestionVoteFactory(question=q)
    QuestionVoteFactory(question=q)
    self.refresh()
    response = self.client.get(reverse('search.advanced'), {'q': '', 'tags': 'desktop', 'w': '2', 'a': '1', 'num_voted': 2, 'num_votes': 5, 'format': 'json'})
    eq_(200, response.status_code)
    content = json.loads(response.content)
    eq_(content['total'], 0)
    response = self.client.get(reverse('search.advanced'), {'q': '', 'tags': 'desktop', 'w': '2', 'a': '1', 'num_voted': 1, 'num_votes': 1, 'format': 'json'})
    eq_(200, response.status_code)
    content = json.loads(response.content)
    eq_(content['total'], 0)
