Repository: python-poetry/poetry

Issue:
Discrepancy regarding license between doc and poetry init
<!--
  Hi there! Thank you for discovering and submitting an issue.

  Before you submit this; let's make sure of a few things.
  Please make sure the following boxes are ticked if they are correct.
  If not, please try and fulfill these first.
-->

<!-- Checked checkbox should look like this: [x] -->
- [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/sdispater/poetry/issues) of this repo and believe that this is not a duplicate.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (`-vvv` option).

<!--
  Once those are done, if you're able to fill in the following list with your information,
  it'd be very helpful to whoever handles the issue.
-->

- **OS version and name**: Manjaro Linux
- **Poetry version**: 0.11.1
- **Link of a [Gist](https://gist.github.com/) with the contents of your pyproject.toml file**: 

## Issue
<!-- Now feel free to write your issue, but please be descriptive! Thanks again 🙌 ❤️ -->
During the `license` prompt of `poetry init`, a valid license is required as input. Acording to the documentation, a license is highly recommended, but not actually required. This descrepancy should be removed by updating either the documentation or the code.



Discussion:

Resolving patch:
diff --git a/poetry/console/commands/init.py b/poetry/console/commands/init.py
--- a/poetry/console/commands/init.py
+++ b/poetry/console/commands/init.py
@@ -296,7 +296,8 @@ def _validate_author(self, author, default):
     def _validate_license(self, license):
         from poetry.spdx import license_by_id
 
-        license_by_id(license)
+        if license:
+            license_by_id(license)
 
         return license
 


Test patch:
diff --git a/tests/console/commands/test_init.py b/tests/console/commands/test_init.py
--- a/tests/console/commands/test_init.py
+++ b/tests/console/commands/test_init.py
@@ -113,3 +113,44 @@ def test_interactive_with_dependencies(app, repo, mocker, poetry):
 """
 
     assert expected in output
+
+
+def test_empty_license(app, mocker, poetry):
+    command = app.find("init")
+    command._pool = poetry.pool
+
+    mocker.patch("poetry.utils._compat.Path.open")
+    p = mocker.patch("poetry.utils._compat.Path.cwd")
+    p.return_value = Path(__file__)
+
+    tester = CommandTester(command)
+    tester.set_inputs(
+        [
+            "my-package",  # Package name
+            "1.2.3",  # Version
+            "",  # Description
+            "n",  # Author
+            "",  # License
+            "",  # Python
+            "n",  # Interactive packages
+            "n",  # Interactive dev packages
+            "\n",  # Generate
+        ]
+    )
+    tester.execute([("command", command.name)])
+
+    output = tester.get_display(True)
+    expected = """\
+[tool.poetry]
+name = "my-package"
+version = "1.2.3"
+description = ""
+authors = ["Your Name <you@example.com>"]
+
+[tool.poetry.dependencies]
+python = "*"
+
+[tool.poetry.dev-dependencies]
+"""
+
+    assert expected in output