Skip to content

Commit

Permalink
fix test obj to comply with api specs
Browse files Browse the repository at this point in the history
  • Loading branch information
OncoText server authored and OncoText server committed Jan 24, 2018
1 parent 96e4de1 commit d523374
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/api_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import json
import sys
import os
from os.path import dirname, realpath
sys.path.append(dirname(dirname(realpath(__file__))))
import requests
import unittest
import pdb
Expand All @@ -11,12 +14,10 @@
TRAIN_DB_PATH = Config.DB_TRAIN_PATH
UNK_DB_PATH = Config.DB_UNLABLED_PATH

ADDITIONAL_DATA = { }
ADDITIONAL_DATA = [{ }]
FAKE_REPORT_TEXT = "Foo blah blah DCIS glue"
ADDITIONAL_DATA[Config.RAW_REPORT_TEXT_KEY] = FAKE_REPORT_TEXT



ADDITIONAL_DATA[0][Config.RAW_REPORT_TEXT_KEY] = FAKE_REPORT_TEXT
ADDITIONAL_DATA[0]['DCIS'] = '1'


class Test_MIT_App(unittest.TestCase):
Expand Down Expand Up @@ -63,8 +64,7 @@ def test_add_unk(self):
self.assertEqual(response.status_code, 200)

def test_full_predict_flow(self):
addit_unk = pickle.load(open(ADD_UNK_PATH,'rb'))
payload = json.dumps(addit_unk)
payload = json.dumps(ADDITIONAL_DATA)
params = {"name":self.name}

response = requests.post( os.path.join(DOMAIN, 'addUnlabeled'),
Expand Down

0 comments on commit d523374

Please sign in to comment.