Example #1
0
def test_answer_question():
    u = User.create(user_id=uuid4())
    root = Category.get_root()
    cat = root.create_sub("monkey")
    question = Question.create(category=cat,
                               text="test question",
                               user=u)
    answer = Answer.create(user=u, question=question, text="monkey")

    u2 = User.create(user_id=uuid4())
    answer.vote(u2, 1)
Example #2
0
 def answer(self, user, text):
     answer = Answer.create(user, self, text)
     return answer
Example #3
0
 def answer(self, user, text):
     answer = Answer.create(user, self, text)
     return answer