Example #1
0
    def test_sort_order(self):
        Question.create(text="This is question 1", order=2)
        Question.create(text="This is question 2", order=1)

        questions = Question.all()

        self.assertEquals(1, questions[0].order)
        self.assertEquals(2, questions[1].order)
Example #2
0
 def api_all_questions(self):
     self.context['data'] = Question.all()
Example #3
0
 def api_all_questions(self):
     self.context['data'] = Question.all()