コード例 #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
ファイル: test_models.py プロジェクト: uktrade/data-explorer
    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)