فهرست منبع

test cases modifications

Aziz Ketari 4 سال پیش
والد
کامیت
88708336c3
2فایلهای تغییر یافته به همراه11 افزوده شده و 4 حذف شده
  1. 1 1
      README.md
  2. 10 3
      scripts/retrieving.py

+ 1 - 1
README.md

@@ -88,7 +88,7 @@ Following the pre-processing, it's time to store the data in a more searchable f
 `python3 ./scripts/storing.py True True [Model_of_your_choice]`
 
 ## Test
-Last but not least, you can query your databases using this script.
+Last but not least, this script will run a few test cases and display the results. Feel free to modify the test cases.
 
 `python3 ./scripts/retrieving.py`
 

+ 10 - 3
scripts/retrieving.py

@@ -25,14 +25,21 @@ datastore_client = datastore.Client(credentials=credentials)
 try:
     query = constructQuery(column_lst=['*'], case_id='case23')
     results_lst = returnQueryResults(bq_client, query)
-    logging.info("Here is the result of the test query: \n {}".format(results_lst))
+    logging.info("Here is the result of the BigQuery test case: \n")
+    logging.info("======================================START======================================")
+    logging.info(results_lst)
+    logging.info("======================================FINISH======================================")
+
 except Exception as e:
     logging.error("Error", e)
 
 try:
-    filter_dict = {'Sign or Symptom': ['onset symptoms', "chills"]}
+    filter_dict = {'Disease or Syndrome': ['heart failure']}
     results = getCases(datastore_client, filter_dict, limit=10)
-    logging.info("Here is the result of the test query: \n {}".format(results))
+    logging.info("Here is the result of the Datastore test case: \n")
+    logging.info("======================================START======================================")
+    logging.info(results)
+    logging.info("======================================FINISH======================================")
 except Exception as e:
     logging.error("Error", e)