Index: tests/test_page_outputs.py |
=================================================================== |
--- a/tests/test_page_outputs.py |
+++ b/tests/test_page_outputs.py |
@@ -50,22 +50,25 @@ |
@pytest.fixture(scope='session') |
def output_pages(static_output): |
return get_dir_contents(static_output) |
@pytest.mark.parametrize('filename,expected_output', static_expected_outputs) |
def test_static(output_pages, filename, expected_output): |
- assert output_pages[filename] == expected_output |
+ if expected_output.startswith('## MISSING'): |
Vasily Kuznetsov
2018/01/19 15:34:29
This allows us to check that a certain file _is_no
Jon Sonesen
2018/01/19 19:25:35
Acknowledged.
|
+ assert filename not in output_pages |
+ else: |
+ assert expected_output == output_pages[filename] |
@pytest.mark.parametrize('filename,expected_output', dynamic_expected_outputs) |
def test_dynamic(dynamic_server, filename, expected_output): |
response = urllib2.urlopen(dynamic_server + filename) |
- assert response.read().strip() == expected_output |
+ assert expected_output == response.read().strip() |
Vasily Kuznetsov
2018/01/19 15:34:29
I changed the order of arguments in a comparison t
Jon Sonesen
2018/01/19 19:25:35
Acknowledged.
|
def test_revision_arg(revision, output_pages): |
if revision is None: |
assert 'en/bar' in output_pages |
else: |
assert 'en/bar' not in output_pages |