Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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()
Esempio n. 5
0
 def test_ok(self):
     rec = getrec()
     rmm.submit_for_ingest(rec, endpt, 'bo')
Esempio n. 6
0
 def test_ok(self):
     rec = getrec()
     rmm.submit_for_ingest(rec, endpt, 'bo', 'critic', 'header')