Ejemplo n.º 1
0
 def testPathASR(self):
     tester = app.test_client(self)
     response = tester.post("/api/v1/asr",
                            content_type="application/json",
                            data=json.dumps(dict()))
     self.assertEqual(response.status_code, 400)
     return
Ejemplo n.º 2
0
 def testErroes(self):
     tester = app.test_client(self)
     data = {
         "node": ['1', '2'],
         "edges": [],
         "weights": [],
         "src": "1",
         "dst": "3"
     }
     response = tester.post("/api/v1/bfs",
                            content_type="application/json",
                            data=json.dumps(data))
     self.assertEqual(response.status_code, 400)
     response = tester.post("/api/v1/Uniform",
                            content_type="application/json",
                            data=json.dumps(data))
     self.assertEqual(response.status_code, 400)
     return
Ejemplo n.º 3
0
 def testAvailability(self):
     tester = app.test_client(self)
     response = tester.post("/test", content_type="json/text")
     self.assertEqual(response.status_code, 200)
     self.assertTrue("OK" in str(response.data))
Ejemplo n.º 4
0
 def testElucidUCS(self):
     tester = app.test_client(self)
     response = tester.post("/api/v1/info/ucs", content_type="json/text")
     self.assertEqual(response.status_code, 200)