Пример #1
0
 def test_determine_repo(self):
     """Test determine_repo."""
     assert (
         ImageBuildArgs.determine_repo(
             context=None, ecr_repo={"key": "val"}, repo="something"
         )
         == "something"
     )
Пример #2
0
 def test_determine_repo_ecr(self, mocker: MockerFixture) -> None:
     """Test determine_repo ecr."""
     repo = ElasticContainerRegistryRepository(account_id="123456012",
                                               aws_region="us-east-1",
                                               repo_name="test")
     mocker.patch(
         MODULE + ".ElasticContainerRegistryRepository",
         parse_obj=MagicMock(return_value=repo),
     )
     assert (ImageBuildArgs.determine_repo(
         context=None,
         ecr_repo={
             "repo_name": repo.name,
             "account_id": repo.registry.account_id,
             "aws_region": repo.registry.region,
         },
         repo=None,
     ) == repo.fqn)