Skip to content

Commit

Permalink
rename hash method
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Apr 15, 2024
1 parent f74925e commit 104ed51
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dvuploader/dvuploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ async def _validate_and_hash_file(
progress: Progress,
task_id: TaskID,
):
file.extract_filename_hash_file()
file.calculate_hash()
progress.update(task_id, advance=1)

def _check_duplicates(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def test_full_input(self):

# Act
cli_input = _parse_yaml_config(fpath)
[file.extract_filename_hash_file() for file in cli_input.files]
[file.calculate_hash() for file in cli_input.files]

# Assert
expected_files = [
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_read_file(self):
directoryLabel="",
)

file.extract_filename_hash_file()
file.calculate_hash()

# Assert
assert file.fileName == "somefile.txt"
Expand All @@ -29,7 +29,7 @@ def test_read_non_existent_file(self):
directoryLabel="",
)

file.extract_filename_hash_file()
file.calculate_hash()

def test_read_non_file(self):
# Arrange
Expand All @@ -42,4 +42,4 @@ def test_read_non_file(self):
directoryLabel="",
)

file.extract_filename_hash_file()
file.calculate_hash()
4 changes: 2 additions & 2 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_all_files_added_except_hidden(self):

# Act
files = add_directory(directory)
[file.extract_filename_hash_file() for file in files]
[file.calculate_hash() for file in files]

# Assert
expected_files = [
Expand Down Expand Up @@ -46,7 +46,7 @@ def test_all_files_added_except_hidden_and_dunder(self):

# Act
files = add_directory(directory, ignore=[r"^\.", "__.*__"])
[file.extract_filename_hash_file() for file in files]
[file.calculate_hash() for file in files]

# Assert
expected_files = [
Expand Down

0 comments on commit 104ed51

Please sign in to comment.