예제 #1
0
 def test_list_excludes_answered(self):
     Util.new_question(self.user)
     q2 = Util.new_question(self.user)
     self.assertEquals(Question.latest(), q2)
     q2.is_answered = True
     q2.save()
     self.assertNotEquals(Question.latest(), q2)
예제 #2
0
 def test_list_excludes_answered(self):
     Util.new_question(self.user)
     q2 = Util.new_question(self.user)
     self.assertEquals(Question.latest(), q2)
     q2.is_answered = True
     q2.save()
     self.assertNotEquals(Question.latest(), q2)
예제 #3
0
 def test_list_excludes_nonpublished(self):
     Util.new_question(self.user)
     q2 = Util.new_question(self.user)
     self.assertEquals(Question.latest(), q2)
     q2.is_published = False
     q2.save()
     self.assertNotEquals(Question.latest(), q2)
예제 #4
0
 def test_list_excludes_nonpublished(self):
     Util.new_question(self.user)
     q2 = Util.new_question(self.user)
     self.assertEquals(Question.latest(), q2)
     q2.is_published = False
     q2.save()
     self.assertNotEquals(Question.latest(), q2)