Index: tests/test_page_outputs.py |
=================================================================== |
--- a/tests/test_page_outputs.py |
+++ b/tests/test_page_outputs.py |
@@ -23,17 +23,17 @@ |
return get_dir_contents(expected_out_path).items() |
expected_outputs = get_expected_outputs() |
@pytest.fixture(scope='session') |
def static_output(request, temp_site): |
static_out_path = os.path.join(temp_site, 'static_out') |
- sys.argv = ['filler', temp_site, static_out_path] |
+ sys.argv = ['filler', temp_site, static_out_path, '--rev', 'master'] |
runpy.run_module('cms.bin.generate_static_pages', run_name='__main__') |
return static_out_path |
@pytest.yield_fixture() |
def dynamic_server(temp_site): |
args = ['python', 'runserver.py', temp_site] |
# Werkzeug is a dependency of flask which we are using for the mock api |
@@ -55,8 +55,12 @@ |
def test_static(output_pages, filename, expected_output): |
assert output_pages[filename] == expected_output |
@pytest.mark.parametrize('filename,expected_output', expected_outputs) |
def test_dynamic(dynamic_server, filename, expected_output): |
response = urllib2.urlopen(dynamic_server + filename) |
assert response.read() == expected_output |
+ |
+ |
+def test_revision_arg(output_pages): |
Jon Sonesen
2017/04/01 12:40:56
The bookmark consists of an additional page 'bar'
Vasily Kuznetsov
2017/04/03 09:55:08
We should also run generation with no '--rev' argu
Jon Sonesen
2017/04/03 10:11:00
Acknowledged.
|
+ assert 'bar' not in output_pages |