Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_on_github_pages(mocker, project_dir, chdir):
with chdir(project_dir):
mocker.patch("mkdocs.commands.gh_deploy.gh_deploy")
api.on_github_pages()
mkdocs.commands.gh_deploy.gh_deploy.assert_called_once()
- `portray in_browser`: Runs a server with the rendered documentation pointing a browser to it
- `portray server`: Starts a local development server (by default at localhost:8000)
- `portray project_configuration`: Returns back the project configuration as determined by` portray`
"""
from pprint import pprint
import hug
from portray import api, logo
cli = hug.cli(api=hug.API(__name__, doc=logo.ascii_art))
cli(api.as_html)
cli.output(pprint)(api.project_configuration)
cli(api.server)
cli(api.in_browser)
cli(api.on_github_pages)