HomeSoftware Heritage

Refactor the use of archive `Storage` object for testing

Description

Refactor the use of archive Storage object for testing

Remove any use of swh.model.tests.swh_model_data.TEST_OBJECTS, and keep a single fixture for
ArchiveInterface objects based on ArchiveStorage (using swh_storage fixture as parameter).
This avoids duplicating every test for each ArchiveInterface implementation. All
implementations of ArchiveInterface are tested against each other in test_archive_interface.

Also, ArchiveStorage now has a storage attribute to access the underlying StorageInterface
object, so that test no longer needs to receive archive and swh_storage separately. Each
test is responsible for filling archive. storage with the required data specific to the test.

Details

Provenance
aevisoAuthored on Jul 30 2021, 3:37 PM
aevisoPushed on Aug 6 2021, 4:00 PM
Differential Revision
D6053: Refactor the use of archive `Storage` object for testing
Parents
rDPROV91e4dcd4148d: Add some missing type annotations and remove already done TODO's
Branches
Unknown
Tags
Unknown
Build Status
Buildable 22933
Build 35759: test-and-buildJenkins console · Jenkins