@@ -9,15 +9,15 @@ class TestBlockscore(unittest.TestCase):
99
1010 def setUp (self ):
1111 try :
12- self .client = blockscore .Client ({'api_key' : 'your_api_key' })
12+ self .client = blockscore .Client ({'api_key' : os . environ [ 'BLOCKSCORE_API' ] })
1313 except KeyError :
1414 sys .stderr .write ("To run tests, you must have a BLOCKSCORE_API environment variable with a test api key\n " )
1515 sys .exit (2 )
16- self .test_identity = ['us_citizen' , ' 1980-01-01' ,{'ssn' : '0000' },{'first' : 'john' , 'last' : 'doe' },{'street1' : '1 Infinite Loop' , 'city' : 'Palo Alto' , 'state' : 'ca' , 'postal_code' : '94309' , 'country ' : 'us' }]
16+ self .test_identity = ['1980-01-01' ,{'ssn' : '0000' },{'first' : 'john' , 'last' : 'doe' },{'street1' : '1 Infinite Loop' , 'city' : 'Palo Alto' , 'state' : 'ca' , 'postal_code' : '94309' , 'country_code ' : 'us' }]
1717
1818 def test_create_verification (self ):
1919 verif = self .client .verification .create (* self .test_identity )
20- self .assertEqual (verif .body ['date_of_birth' ], self .test_identity [1 ])
20+ self .assertEqual (verif .body ['date_of_birth' ], self .test_identity [0 ])
2121
2222 def test_retrieve_verification (self ):
2323 verif = self .client .verification .create (* self .test_identity )
@@ -52,7 +52,7 @@ def test_score_questions(self):
5252 verif_id = verif ['id' ]
5353 qset = self .client .question_set .create (verif_id )
5454 qset = qset .body
55- qset_id = qset ['question_set_id ' ]
55+ qset_id = qset ['id ' ]
5656 score = self .client .question_set .score (verif_id , qset_id , [
5757 {'question_id' :1 , 'answer_id' :1 },
5858 {'question_id' :2 , 'answer_id' :1 },
@@ -61,7 +61,7 @@ def test_score_questions(self):
6161 {'question_id' :5 , 'answer_id' :1 }
6262 ])
6363 score = score .body
64- self .assertEqual (score ['question_set_id ' ],qset_id )
64+ self .assertEqual (score ['id ' ],qset_id )
6565 self .assertIsInstance (score ['score' ],float )
6666
6767
0 commit comments