def METHOD_NAME(repository, generate_directory):
    """Test the ``Repository.put_object_from_filelike`` method when it should raise."""
    directory = generate_directory({'file_a': None})
    with pytest.raises(TypeError):
        repository.put_object_from_filelike(directory / 'file_a')  # Path-like object
    with pytest.raises(TypeError):
        repository.put_object_from_filelike(directory / 'file_a')  # String
    with pytest.raises(TypeError):
        with open(directory / 'file_a', encoding='utf-8') as handle:
            repository.put_object_from_filelike(handle)  # Not in binary mode