def test_repository_url_with_no_context_file(mocker, template_url) -> None:
    """Verify cloned repository without `cookiecutter.json` file raises error."""
    mocker.patch(
        'cookiecutter.repository.clone',
        return_value='tests/fake-repo-bad',
        autospec=True,
    )

    with pytest.raises(exceptions.RepositoryNotFound) as err:
        repository.determine_repo_dir(
            template_url,
            abbreviations={},
            clone_to_dir=".",
            checkout=None,
            no_input=True,
        )

    assert str(err.value) == (
        'A valid repository for "{}" could not be found in the following '
        'locations:\n{}'.format(template_url, 'tests/fake-repo-bad')
    )
Verify cloned repository without `cookiecutter.json` file raises error.
tests/repository/test_determine_repo_dir_clones_repo.py