@@ -21,32 +21,35 @@ def output_file_path():
2121
2222@pytest .fixture
2323def reference_file_path ():
24- return "https://github.com/mindee/client-lib-test-data/blob/main/v1/products/invoice_splitter/invoice_5p.pdf?raw=true"
24+ ref_path = os .getenv ("MINDEE_V2_SE_TESTS_BLANK_PDF_URL" )
25+ if ref_path is None :
26+ raise ValueError ("MINDEE_V2_SE_TESTS_BLANK_PDF_URL not set" )
27+ return ref_path
2528
2629
2730@pytest .mark .integration
2831def test_load_local_file (client , reference_file_path ):
2932 url_source = URLInputSource (reference_file_path )
3033 local_source = url_source .as_local_input_source ()
3134 result = client .parse (InvoiceV4 , local_source )
32- assert result .document .n_pages == 5
33- assert result .document .filename == "invoice_5p .pdf"
35+ assert result .document .n_pages == 1
36+ assert result .document .filename == "blank_1 .pdf"
3437
3538
3639@pytest .mark .integration
3740def test_custom_file_name (client , reference_file_path ):
3841 url_source = URLInputSource (reference_file_path )
3942 local_source = url_source .as_local_input_source ("customName.pdf" )
4043 result = client .parse (InvoiceV4 , local_source )
41- assert result .document .n_pages == 5
44+ assert result .document .n_pages == 1
4245 assert result .document .filename == "customName.pdf"
4346
4447
4548@pytest .mark .integration
4649def test_save_file (client , reference_file_path , output_file_path ):
4750 url_source = URLInputSource (reference_file_path )
4851 url_source .save_to_file (output_file_path )
49- assert os .path .exists (os .path .join (output_file_path , "invoice_5p .pdf" ))
52+ assert os .path .exists (os .path .join (output_file_path , "blank_1 .pdf" ))
5053
5154
5255@pytest .mark .integration
@@ -59,4 +62,4 @@ def test_save_file_with_filename(client, reference_file_path, output_file_path):
5962@pytest .fixture (autouse = True )
6063def cleanup ():
6164 yield
62- cleanup_output_files (["invoice_5p .pdf" , "customFileName.pdf" ])
65+ cleanup_output_files (["blank_1 .pdf" , "customFileName.pdf" ])
0 commit comments