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_cli_srcpath_absolute(mock_make_site, mock_getcwd, mock_isdir):
mock_isdir.return_value = True
mock_getcwd.return_value = '/'
cli.render({
'--srcpath': '/foo/templates',
'--outpath': None,
'--static': None,
'watch': False,
})
mock_make_site.assert_called_once_with(
searchpath='/foo/templates',
outpath='/',
staticpaths=None
)
def test_cli_srcpath(mock_make_site, mock_getcwd, mock_isdir):
mock_isdir.return_value = True
mock_getcwd.return_value = '/'
cli.render({
'--srcpath': 'templates',
'--outpath': None,
'--static': None,
'watch': False,
})
mock_make_site.assert_called_once_with(
searchpath='/templates',
outpath='/',
staticpaths=None
)