def METHOD_NAME(self):
    ecr_client = mock.MagicMock
    ecr_client.registries = {}
    ecr_client.registries[AWS_REGION] = Registry(
        id=AWS_ACCOUNT_NUMBER,
        region=AWS_REGION,
        scan_type="BASIC",
        repositories=[
            Repository(
                name=repository_name,
                arn=repository_arn,
                region=AWS_REGION,
                scan_on_push=True,
                policy="",
                images_details=None,
                lifecycle_policy="",
            )
        ],
        rules=[
            ScanningRule(
                scan_frequency="SCAN_ON_PUSH",
                scan_filters=[{"filter": "*", "filterType": "WILDCARD"}],
            )
        ],
    )
    with mock.patch(
        "prowler.providers.aws.services.ecr.ecr_service.ECR",
        ecr_client,
    ):
        from prowler.providers.aws.services.ecr.ecr_registry_scan_images_on_push_enabled.ecr_registry_scan_images_on_push_enabled import (
            ecr_registry_scan_images_on_push_enabled,
        )
        check = ecr_registry_scan_images_on_push_enabled()
        result = check.execute()
        assert len(result) == 1
        assert result[0].status == "PASS"
        assert search("with scan on push", result[0].status_extended)
        assert result[0].resource_id == AWS_ACCOUNT_NUMBER
        assert result[0].region == AWS_REGION