update readme

This commit is contained in:
2022-05-21 06:29:06 +03:00
parent 07b7689701
commit 9f134e37b6
24 changed files with 53 additions and 41 deletions

View File

@ -14,7 +14,7 @@ def test_migrate_package_remotes(package_ahriman: Package, connection: Connectio
must put package remotes to database
"""
mocker.patch(
"ahriman.core.database.operations.package_operations.PackageOperations._packages_get_select_package_bases",
"ahriman.core.database.operations.PackageOperations._packages_get_select_package_bases",
return_value={package_ahriman.base: package_ahriman})
mocker.patch("pathlib.Path.exists", return_value=False)
@ -28,7 +28,7 @@ def test_migrate_package_remotes_has_local(package_ahriman: Package, connection:
must skip processing for packages which have local cache
"""
mocker.patch(
"ahriman.core.database.operations.package_operations.PackageOperations._packages_get_select_package_bases",
"ahriman.core.database.operations.PackageOperations._packages_get_select_package_bases",
return_value={package_ahriman.base: package_ahriman})
mocker.patch("pathlib.Path.exists", return_value=True)
@ -42,7 +42,7 @@ def test_migrate_package_remotes_vcs(package_ahriman: Package, connection: Conne
must process VCS packages with local cache
"""
mocker.patch(
"ahriman.core.database.operations.package_operations.PackageOperations._packages_get_select_package_bases",
"ahriman.core.database.operations.PackageOperations._packages_get_select_package_bases",
return_value={package_ahriman.base: package_ahriman})
mocker.patch("pathlib.Path.exists", return_value=True)
mocker.patch.object(Package, "is_vcs", True)
@ -57,7 +57,7 @@ def test_migrate_package_remotes_no_remotes(package_ahriman: Package, connection
must skip processing in case if no remotes generated (should never happen)
"""
mocker.patch(
"ahriman.core.database.operations.package_operations.PackageOperations._packages_get_select_package_bases",
"ahriman.core.database.operations.PackageOperations._packages_get_select_package_bases",
return_value={package_ahriman.base: package_ahriman})
mocker.patch("pathlib.Path.exists", return_value=False)
mocker.patch("ahriman.models.remote_source.RemoteSource.from_source", return_value=None)

View File

@ -21,7 +21,7 @@ def test_calculate_hash_small(resource_path_root: Path) -> None:
must calculate checksum for path which is single chunk
"""
path = resource_path_root / "models" / "package_ahriman_srcinfo"
assert HttpUpload.calculate_hash(path) == "c0aaf6ebf95ca9206dc8ba1d8ff10af3"
assert HttpUpload.calculate_hash(path) == "fcfc0f2522b0ee92de89fcedc7e56010"
def test_get_body_get_hashes() -> None:

View File

@ -31,7 +31,7 @@ def test_calculate_etag_small(resource_path_root: Path) -> None:
must calculate checksum for path which is single chunk
"""
path = resource_path_root / "models" / "package_ahriman_srcinfo"
assert S3.calculate_etag(path, _chunk_size) == "c0aaf6ebf95ca9206dc8ba1d8ff10af3"
assert S3.calculate_etag(path, _chunk_size) == "fcfc0f2522b0ee92de89fcedc7e56010"
def test_files_remove(s3_remote_objects: List[Any]) -> None: