Skip to content

Commit 1dde3a1

Browse files
fix: improve filename in testsuite for caching
1 parent 5a1eabb commit 1dde3a1

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

tests/test_profile.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def test_profile_parsing_file_quicksilver_sync_basic(hrflow_client):
132132
s3_url = """https://riminder-documents-eu-2019-12.s3-eu-west-1.amazonaws.com/\
133133
teams/fc9d40fd60e679119130ea74ae1d34a3e22174f2/sources/07065e555609a231752a586afd6\
134134
495c951bbae6b/profiles/1fed6e15b2df4465b1e406adabd0075d3214bc18/parsing/resume.pdf"""
135-
file = _file_get(s3_url, "profile_sync")
135+
file = _file_get(s3_url, "nico_durant.pdf")
136136
model = ProfileParsingFileResponse.parse_obj(
137137
hrflow_client.profile.parsing.add_file(
138138
source_key=_var_from_env_get("HRFLOW_SOURCE_KEY_QUICKSILVER_SYNC"),
@@ -225,7 +225,7 @@ def test_profile_parsing_file_hawk_sync_basic(hrflow_client):
225225
s3_url = """https://riminder-documents-eu-2019-12.s3-eu-west-1.amazonaws.com/\
226226
teams/fc9d40fd60e679119130ea74ae1d34a3e22174f2/sources/07065e555609a231752a586afd6\
227227
495c951bbae6b/profiles/1fed6e15b2df4465b1e406adabd0075d3214bc18/parsing/resume.pdf"""
228-
file = _file_get(s3_url, "profile_sync")
228+
file = _file_get(s3_url, "nico_durant.pdf")
229229
model = ProfileParsingFileResponse.parse_obj(
230230
hrflow_client.profile.parsing.add_file(
231231
source_key=_var_from_env_get("HRFLOW_SOURCE_KEY_HAWK_SYNC"),
@@ -319,12 +319,13 @@ def test_profile_parsing_file_quicksilver_async_basic(hrflow_client):
319319
s3_url = """https://riminder-documents-eu-2019-12.s3-eu-west-1.amazonaws.com/\
320320
teams/fc9d40fd60e679119130ea74ae1d34a3e22174f2/sources/06d96aab2661b16eaf4d34d385d\
321321
3c2b0cf00c0eb/profiles/d79768fb63013a8bdd04e7e8742cc84afd428a87/parsing/resume.pdf"""
322-
file = _file_get(s3_url, "profile_async")
322+
file = _file_get(s3_url, "john_smith.pdf")
323323
reference = str(uuid1())
324324
model = ProfileParsingFileResponse.parse_obj(
325325
hrflow_client.profile.parsing.add_file(
326326
source_key=SOURCE_KEY,
327327
profile_file=file,
328+
profile_name="john_smith.pdf",
328329
reference=reference,
329330
)
330331
)
@@ -399,12 +400,13 @@ def test_profile_parsing_file_mozart_async_basic(hrflow_client):
399400
s3_url = """https://riminder-documents-eu-2019-12.s3-eu-west-1.amazonaws.com/\
400401
teams/fc9d40fd60e679119130ea74ae1d34a3e22174f2/sources/06d96aab2661b16eaf4d34d385d\
401402
3c2b0cf00c0eb/profiles/d79768fb63013a8bdd04e7e8742cc84afd428a87/parsing/resume.pdf"""
402-
file = _file_get(s3_url, "profile_async")
403+
file = _file_get(s3_url, "john_smith.pdf")
403404
reference = str(uuid1())
404405
model = ProfileParsingFileResponse.parse_obj(
405406
hrflow_client.profile.parsing.add_file(
406407
source_key=SOURCE_KEY,
407408
profile_file=file,
409+
profile_file_name="john_smith.pdf",
408410
reference=reference,
409411
)
410412
)
@@ -653,13 +655,13 @@ def test_profile_parsing_hawk_sync_png(hrflow_client):
653655
s3_url = """https://riminder-documents-eu-2019-12.s3.eu-west-1.amazonaws.com/teams/\
654656
fc9d40fd60e679119130ea74ae1d34a3e22174f2/sources/7f61abfb4a0ea127ca1536136a0891c5948bfb\
655657
7f/files/035b6b44943877bae355a527efcb7b721dbcdde7/file-nico_durant.png"""
656-
file = _file_get(s3_url, "profile_png")
658+
file = _file_get(s3_url, "nico_durant.png")
657659
reference = str(uuid1())
658660
model = ProfileParsingFileResponse.parse_obj(
659661
hrflow_client.profile.parsing.add_file(
660662
source_key=SOURCE_KEY,
661663
profile_file=file,
662-
profile_file_name="resume.png",
664+
profile_file_name="nico_durant.png",
663665
reference=reference,
664666
)
665667
)
@@ -674,13 +676,13 @@ def test_profile_parsing_hawk_sync_docx(hrflow_client):
674676
s3_url = """https://riminder-documents-eu-2019-12.s3.eu-west-1.amazonaws.com/teams/\
675677
fc9d40fd60e679119130ea74ae1d34a3e22174f2/sources/7f61abfb4a0ea127ca1536136a0891c5948bfb\
676678
7f/files/73ad352f0e93a46c82591655edacaf01711141a6/file-nico_durant.docx"""
677-
file = _file_get(s3_url, "profile_docx")
679+
file = _file_get(s3_url, "nico_durant.docx")
678680
reference = str(uuid1())
679681
model = ProfileParsingFileResponse.parse_obj(
680682
hrflow_client.profile.parsing.add_file(
681683
source_key=SOURCE_KEY,
682684
profile_file=file,
683-
profile_file_name="resume.png",
685+
profile_file_name="nico_durant.docx",
684686
reference=reference,
685687
)
686688
)

tests/test_text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def test_ocr_basic(hrflow_client):
360360
s3_url = """https://riminder-documents-eu-2019-12.s3-eu-west-1.amazonaws.com/\
361361
teams/fc9d40fd60e679119130ea74ae1d34a3e22174f2/sources/07065e555609a231752a586afd6\
362362
495c951bbae6b/profiles/52e3c23a5f21190c59f53c41b5630ecb5d414f94/parsing/resume.pdf"""
363-
file = _file_get(s3_url, "ocr")
363+
file = _file_get(s3_url, "ocr.pdf")
364364
assert file is not None
365365
model = TextOCRResponse.parse_obj(hrflow_client.text.ocr.post(file=file))
366366
assert model.code == requests.codes.ok

0 commit comments

Comments
 (0)