def METHOD_NAME(repository, generate_directory):
    """Test the ``Repository.has_object`` method."""
    directory = generate_directory({'file_a': None})
    assert not repository.has_object('non_existant')
    with open(directory / 'file_a', 'rb') as handle:
        key = repository.put_object_from_filelike(handle)
    assert repository.has_object(key)