comparison tests/test_baking_baker.py @ 674:f987b29d6fab

tests: Add ability to run tests with a theme site. * Remove automatic creating of `config.yml`. * Add option to specify `theme_config` in YAML tests.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 06 Mar 2016 23:48:01 -0800
parents 34e57d4b97e2
children c6035785dbfc
comparison
equal deleted inserted replaced
673:d6403c21bdea 674:f987b29d6fab
51 assert expected == path 51 assert expected == path
52 52
53 53
54 def test_removed(): 54 def test_removed():
55 fs = (mock_fs() 55 fs = (mock_fs()
56 .withConfig()
56 .withPage('pages/foo.md', {'layout': 'none', 'format': 'none'}, 'a foo page') 57 .withPage('pages/foo.md', {'layout': 'none', 'format': 'none'}, 'a foo page')
57 .withPage('pages/_index.md', {'layout': 'none', 'format': 'none'}, "something")) 58 .withPage('pages/_index.md', {'layout': 'none', 'format': 'none'}, "something"))
58 with mock_fs_scope(fs): 59 with mock_fs_scope(fs):
59 out_dir = fs.path('kitchen/_counter') 60 out_dir = fs.path('kitchen/_counter')
60 app = fs.getApp() 61 app = fs.getApp()
75 'index.html': 'something'} 76 'index.html': 'something'}
76 77
77 78
78 def test_record_version_change(): 79 def test_record_version_change():
79 fs = (mock_fs() 80 fs = (mock_fs()
81 .withConfig()
80 .withPage('pages/foo.md', {'layout': 'none', 'format': 'none'}, 'a foo page')) 82 .withPage('pages/foo.md', {'layout': 'none', 'format': 'none'}, 'a foo page'))
81 with mock_fs_scope(fs): 83 with mock_fs_scope(fs):
82 out_dir = fs.path('kitchen/_counter') 84 out_dir = fs.path('kitchen/_counter')
83 app = fs.getApp() 85 app = fs.getApp()
84 baker = Baker(app, out_dir) 86 baker = Baker(app, out_dir)