1- from voiceit3 import VoiceIt3
1+ from voiceit3 import voiceit3
22import os
33import unittest
44import urllib
1414def downloadVoiceItDriveFile (fileName ):
1515 urllib .request .urlretrieve (VOICEIT_DRIVE_URL + fileName , fileName )
1616
17- class TestVoiceIt3 (unittest .TestCase ):
17+ class Testvoiceit3 (unittest .TestCase ):
1818 @classmethod
1919 def setUpClass (cls ):
2020 print ('Started Downloading Test Files ...' )
@@ -56,7 +56,7 @@ def setUpClass(cls):
5656 @classmethod
5757 def tearDownClass (cls ):
5858 global groups_to_delete ,users_to_delete
59- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
59+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
6060 for user_id in users_to_delete :
6161 my_voiceit .delete_user (user_id )
6262 for group_id in groups_to_delete :
@@ -97,7 +97,7 @@ def tearDownClass(cls):
9797 # Check if api key and token can be found in the environment variables
9898 def test_webhooks (self ):
9999 print ('Testing Notification URL' )
100- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
100+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
101101 if os .environ ['BOXFUSE_ENV' ] == 'voiceittest' :
102102 text_file = open (os .environ ['HOME' ] + '/platformVersion' , "w" )
103103 text_file .write (my_voiceit .version )
@@ -115,7 +115,7 @@ def test_api_key_token(self):
115115 self .assertNotEqual (VI_TOKEN , '' )
116116
117117 def test_file_not_found (self ):
118- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
118+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
119119 print ('Testing File Not Found' )
120120 print (' Testing File Not Found Enrollment' )
121121 try :
@@ -175,7 +175,7 @@ def test_file_not_found(self):
175175 self .assertTrue (True )
176176
177177 def test_users (self ):
178- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
178+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
179179 global users_to_delete
180180 print ('Testing User API Calls' )
181181
@@ -219,7 +219,7 @@ def test_users(self):
219219 self .assertEqual ('SUCC' , ret ['responseCode' ])
220220
221221 def test_sub_accounts (self ):
222- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
222+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
223223 print ('Testing Sub Account API Calls' )
224224
225225 print (' Testing Create Unmanaged Sub Account' )
@@ -247,7 +247,7 @@ def test_sub_accounts(self):
247247 ret = my_voiceit .delete_sub_account (managed_sub_account )
248248
249249 def test_phrases (self ):
250- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
250+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
251251 print ('Testing Phrase API Calls' )
252252
253253 print (' Testing Get Phrases' )
@@ -257,7 +257,7 @@ def test_phrases(self):
257257 self .assertGreaterEqual (len (ret ['phrases' ]), 0 )
258258
259259 def test_groups (self ):
260- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
260+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
261261 global groups_to_delete ,users_to_delete
262262 print ('Test Group API Calls' )
263263
@@ -304,7 +304,7 @@ def test_groups(self):
304304 self .assertEqual ('SUCC' , ret ['responseCode' ])
305305
306306 def test_enrollments (self ):
307- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
307+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
308308 ret = my_voiceit .create_user ()
309309 user_id = my_voiceit .create_user ()['userId' ]
310310 users_to_delete .append (user_id )
@@ -367,7 +367,7 @@ def test_enrollments(self):
367367 self .assertEqual ('SUCC' , ret ['responseCode' ])
368368
369369 def test_verification (self ):
370- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
370+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
371371 user_id = my_voiceit .create_user ()['userId' ]
372372 users_to_delete .append (user_id )
373373 # Create 3 voice,face and video enrollments for user
@@ -414,7 +414,7 @@ def test_verification(self):
414414 self .assertEqual ('SUCC' , ret ['responseCode' ])
415415
416416 def test_identification (self ):
417- my_voiceit = VoiceIt3 (VI_KEY , VI_TOKEN )
417+ my_voiceit = voiceit3 (VI_KEY , VI_TOKEN )
418418 global groups_to_delete ,users_to_delete
419419 print ('Start Identification Setup...' )
420420 user_id_1 = my_voiceit .create_user ()['userId' ]
0 commit comments