'Make sure non-owner/non-admin can\'t solve/unsolve.'

def test_only_owner_or_admin_can_solve_unsolve(self):

    self.client.login(username=self.question.creator.username, password='testpass')
    response = get(self.client, 'questions.details', args=[self.question.id])
    doc = pq(response.content)
    eq_(1, len(doc('input[name="solution"]')))
    self.client.logout()
    u = UserFactory()
    self.client.login(username=u.username, password='testpass')
    response = get(self.client, 'questions.details', args=[self.question.id])
    doc = pq(response.content)
    eq_(0, len(doc('input[name="solution"]')))
    ans = self.question.answers.all()[0]
    response = post(self.client, 'questions.solve', args=[self.question.id, ans.id])
    eq_(403, response.status_code)
    response = post(self.client, 'questions.unsolve', args=[self.question.id, ans.id])
    eq_(403, response.status_code)
