Exemplo n.º 1
0
 def test_clienterror(self):
     rec = getrec()
     try:
         rmm.submit_for_ingest(rec, url + "/goob/?auth=critic", 'bo')
         self.fail("Failed to raise IngestException")
     except rmm.IngestClientError as ex:
         self.assertGreater(ex.status, 400)
Exemplo n.º 2
0
 def test_unauth(self):
     rec = getrec()
     try:
         rmm.submit_for_ingest(rec, url, 'bo')
         self.fail("Failed to raise IngestException")
     except rmm.IngestAuthzError as ex:
         self.assertEqual(ex.status, 401)
Exemplo n.º 3
0
 def test_invalid(self):
     rec = getrec()
     try:
         rmm.submit_for_ingest(rec, endpt + "&strictness=abusive", 'bo')
         self.fail("Failed to raise IngestException")
     except rmm.NotValidForIngest as ex:
         self.assertEqual(ex.status, 400)
         self.assertEqual(len(ex.errors), 4)
Exemplo n.º 4
0
 def test_servererror(self):
     try:
         rec = getrec()
         stopService()
         rmm.submit_for_ingest(rec, endpt, 'bo')
     except rmm.IngestServerError as ex:
         self.assertIsNone(ex.status)
     finally:
         startService()
Exemplo n.º 5
0
 def test_ok(self):
     rec = getrec()
     rmm.submit_for_ingest(rec, endpt, 'bo')
Exemplo n.º 6
0
 def test_ok(self):
     rec = getrec()
     rmm.submit_for_ingest(rec, endpt, 'bo', 'critic', 'header')