Ejemplo n.º 1
0
 def test_gs_err_req(self):
     """
     Test if we can parse geoserver requests
     """
     rq = RequestEvent.from_geoserver(self.service, req_err_big)
     self.assertTrue(rq)
     q = ExceptionEvent.objects.filter(request=rq)
     self.assertEqual(q.count(), 1)
     self.assertEqual(q[0].error_type, 'org.geoserver.platform.ServiceException')
Ejemplo n.º 2
0
 def test_gs_err_req(self):
     """
     Test if we can parse geoserver requests
     """
     rq = RequestEvent.from_geoserver(self.service, req_err_big)
     self.assertTrue(rq)
     q = ExceptionEvent.objects.filter(request=rq)
     self.assertEqual(q.count(), 1)
     self.assertEqual(
         q[0].error_type,
         'org.geoserver.platform.ServiceException')
Ejemplo n.º 3
0
 def handle_collected(self, requests):
     utc = pytz.utc
     now = datetime.utcnow().replace(tzinfo=utc)
     for r in requests:
         RequestEvent.from_geoserver(self.service, r, received=now)
     return RequestEvent.objects.filter(service=self.service, received=now)
 def handle_collected(self, requests):
     now = datetime.now()
     for r in requests:
         RequestEvent.from_geoserver(self.service, r, received=now)
     return RequestEvent.objects.filter(service=self.service, received=now)
Ejemplo n.º 5
0
 def test_gs_req(self):
     """
     Test if we can parse geoserver requests
     """
     rq = RequestEvent.from_geoserver(self.service, req_big)
     self.assertTrue(rq)
Ejemplo n.º 6
0
 def handle_collected(self, requests):
     now = datetime.now()
     for r in requests:
         RequestEvent.from_geoserver(self.service, r, received=now)
     return RequestEvent.objects.filter(service=self.service, received=now)
Ejemplo n.º 7
0
 def test_gs_req(self):
     """
     Test if we can parse geoserver requests
     """
     rq = RequestEvent.from_geoserver(self.service, req_big)
     self.assertTrue(rq)
Ejemplo n.º 8
0
 def handle_collected(self, requests):
     utc = pytz.utc
     now = datetime.utcnow().replace(tzinfo=utc)
     for r in requests:
         RequestEvent.from_geoserver(self.service, r, received=now)
     return RequestEvent.objects.filter(service=self.service, received=now)