def test_get_question_too_far_back(self): self.assertIsNone(get_question_by_day(-8))
def test_get_question_by_day_diff3(self): self.assertEqual(ex.nq2["_id"], get_question_by_day(1)["_id"])
def test_get_question_by_day_diff4(self): self.assertEqual(ex.nq1["_id"], get_question_by_day(8)["_id"])
def test(x): res = client.get('/questions/get_by_day', data={"day": x}) self.assertEqual(200, res.status_code) self.assertEqual( json.loads(res.data)["_id"], str(get_question_by_day(x)["_id"]))