Skip to content

Commit

Permalink
assert .name in other tests as well
Browse files Browse the repository at this point in the history
  • Loading branch information
adhami3310 committed Nov 4, 2024
1 parent 39451b1 commit 8977ab7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ async def get_file_data():

file_data = await AppHarness._poll_for_async(get_file_data)
assert isinstance(file_data, dict)
assert file_data[exp_name] == exp_contents
normalized_file_data = {Path(k).name: v for k, v in file_data.items()}
assert normalized_file_data[exp_name] == exp_contents

# check that the selected files are displayed
selected_files = driver.find_element(By.ID, f"selected_files{suffix}")
Expand Down Expand Up @@ -257,7 +258,9 @@ async def test_upload_file_multiple(tmp_path, upload_file: AppHarness, driver):

# check that the selected files are displayed
selected_files = driver.find_element(By.ID, "selected_files")
assert selected_files.text == "\n".join(exp_files)
assert [Path(name).name for name in selected_files.text.split("\n")] == [
Path(name).name for name in exp_files
]

# do the upload
upload_button.click()
Expand Down

0 comments on commit 8977ab7

Please sign in to comment.