rpm-software-management/rpmlint

Create test `FakePkg`s to use in different tests

Opened this issue · 0 comments

danigm commented

Create common fake packages to reuse in different tests, for example test/mocks/packages.py and there we can have the fake packages defined like config_files, bad_crc_uncompressed, python3_icecream_leftovers, etc.

So in tests we just need to import. We can do this just for packages that are useful in more than one test and for "large" fake package definitions.

In the first version we can have simple packages with standard files, for example, we can mock some complex package with a lot of files, and also we can have there some "random" generated packages using modules like faker, we can add random metadata and some files with random content, config, doc and regular files.