Пример #1
0
 def test_log_saves_duration(self):
     q = SimpleQueryFactory()
     res, ql = q.execute_with_logging(None)
     log = QueryLog.objects.first()
     self.assertEqual(log.duration, res.duration)
Пример #2
0
 def test_log_saves_duration(self):
     q = SimpleQueryFactory()
     res, ql = q.execute_with_logging(None)
     log = QueryLog.objects.first()
     self.assertEqual(log.duration, res.duration)
Пример #3
0
    def test_log_saves_duration(self):
        q = SimpleQueryFactory()
        res, ql = q.execute_with_logging(None, None, 10, 10000)
        log = QueryLog.objects.first()

        self.assertAlmostEquals(log.duration, res.duration, places=9)