Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TODO different commit Rework matching modulemd_defaults units [RHELDS…
…T-6393] Matching modulemd_defaults units for ubi repos population is now reworked and uses Client from pubtools-pulplib in the similar way as matching other units (modulemd, rpm ...) works.
- Loading branch information
Showing
11 changed files
with
738 additions
and
808 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import pytest | ||
|
||
from pubtools.pulplib import RpmUnit, ModulemdUnit, ModulemdDefaultsUnit, FakeController | ||
from ubipop._matcher import UbiUnit | ||
|
||
|
||
def _get_test_unit(klass, **kwargs): | ||
repo_id = kwargs.pop("src_repo_id") | ||
return UbiUnit(klass(**kwargs), repo_id) | ||
|
||
|
||
def get_rpm_unit(**kwargs): | ||
return _get_test_unit(RpmUnit, **kwargs) | ||
|
||
|
||
def get_srpm_unit(**kwargs): | ||
kwargs["content_type_id"] = "srpm" | ||
kwargs["arch"] = "src" | ||
return _get_test_unit(RpmUnit, **kwargs) | ||
|
||
|
||
def get_modulemd_unit(**kwargs): | ||
return _get_test_unit(ModulemdUnit, **kwargs) | ||
|
||
|
||
def get_modulemd_defaults_unit(**kwargs): | ||
return _get_test_unit(ModulemdDefaultsUnit, **kwargs) | ||
|
||
|
||
@pytest.fixture(name="pulp") | ||
def fake_pulp(): | ||
yield FakeController() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.