Fixed test test_cli_args

Changed `""` into `''` to pass an empty token. Seems to be linked to this warning:
```
/opt/conda/lib/python3.8/site-packages/traitlets/traitlets.py:2195: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use '' instead of "''" – or use CUnicode.
```

Added debug information (ouput of the command line).
This commit is contained in:
romainx
2020-09-10 20:00:24 +02:00
parent 384acda330
commit 39dc7752e8

View File

@@ -11,11 +11,13 @@ LOGGER = logging.getLogger(__name__)
def test_cli_args(container, http_client): def test_cli_args(container, http_client):
"""Container should respect notebook server command line args """Container should respect notebook server command line args
(e.g., disabling token security)""" (e.g., disabling token security)"""
container.run( c = container.run(
command=['start-notebook.sh', '--NotebookApp.token=""'] command=["start-notebook.sh", "--NotebookApp.token=''"]
) )
resp = http_client.get('http://localhost:8888') resp = http_client.get('http://localhost:8888')
resp.raise_for_status() resp.raise_for_status()
logs = c.logs(stdout=True).decode('utf-8')
LOGGER.debug(logs)
assert 'login_submit' not in resp.text assert 'login_submit' not in resp.text