11import os
22import unittest
33import warnings
4+ from datetime import datetime , timedelta
5+ from uuid import UUID , uuid4
46
57from sypht .client import SyphtClient
6- from uuid import UUID , uuid4
7- from datetime import datetime , timedelta
88
99
1010def validate_uuid4 (uuid_string ):
@@ -25,9 +25,15 @@ def setUp(self):
2525 def test_with_wrong_fieldset (self ):
2626 with self .assertRaises (Exception ) as context :
2727 with open ("tests/sample_invoice.pdf" , "rb" ) as f :
28- response = self .sypht_client .upload (f , ["sypht.incorrect" ,])
28+ response = self .sypht_client .upload (
29+ f ,
30+ [
31+ "sypht.incorrect" ,
32+ ],
33+ )
2934 self .assertIn (
30- "does not have permission to use fieldSet sypht.incorrect" , response ["error" ]
35+ "does not have permission to use fieldSet sypht.incorrect" ,
36+ response ["error" ],
3137 )
3238
3339 self .assertTrue ("Request failed with status code" in str (context .exception ))
@@ -61,7 +67,7 @@ def test_data_extraction_2(self):
6167 self .assertIn ("bank.bsb" , results )
6268
6369 def test_parent_doc_id (self ):
64- parent_doc_id = uuid4 ()
70+ parent_doc_id = uuid4 ()
6571 with open ("tests/sample_invoice.pdf" , "rb" ) as f :
6672 fid = self .sypht_client .upload (f , ["invoices" ], parent_doc_id = parent_doc_id )
6773 self .assertTrue (validate_uuid4 (fid ))
0 commit comments