Mercurial > piecrust2
comparison tests/test_baking_baker.py @ 836:dca51cd8147a
Merge pull request #42 from GitHub.
Also cleanup the code a bit.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 05 Feb 2017 22:50:12 -0800 |
parents | c6035785dbfc |
children |
comparison
equal
deleted
inserted
replaced
833:cb39c0dbe5f0 | 836:dca51cd8147a |
---|---|
44 | 44 |
45 for site_root in ['/', '/whatever/', '/~johndoe/']: | 45 for site_root in ['/', '/whatever/', '/~johndoe/']: |
46 app.config.set('site/root', urllib.parse.quote(site_root)) | 46 app.config.set('site/root', urllib.parse.quote(site_root)) |
47 baker = PageBaker(app, '/destination') | 47 baker = PageBaker(app, '/destination') |
48 try: | 48 try: |
49 path = baker.getOutputPath(urllib.parse.quote(site_root) + uri) | 49 path = baker.getOutputPath(urllib.parse.quote(site_root) + uri, |
50 pretty) | |
50 expected = os.path.normpath( | 51 expected = os.path.normpath( |
51 os.path.join('/destination', expected)) | 52 os.path.join('/destination', expected)) |
52 assert expected == path | 53 assert expected == path |
53 finally: | 54 finally: |
54 baker.shutdown() | 55 baker.shutdown() |