OLD | NEW |
(Empty) | |
| 1 import os |
| 2 |
| 3 |
| 4 class TestStatic: |
| 5 @classmethod |
| 6 def generate_static_test_pages(cls): |
| 7 import subprocess |
| 8 import runpy |
| 9 import sys |
| 10 sys.path.insert(0, '../') |
| 11 subprocess.call(['hg', 'init', 'cms/tests/test_site']) |
| 12 subprocess.call(['hg', '-R', 'cms/tests/test_site', 'add']) |
| 13 subprocess.call(['hg', '-R', 'cms/tests/test_site', 'commit', |
| 14 '-m', 'test']) |
| 15 sys.argv = ['filler', 'cms/tests/test_site', 'cms/tests/static_out'] |
| 16 runpy.run_module('cms.bin.generate_static_pages', run_name='__main__') |
| 17 |
| 18 def test_extension_removed(self, input_files, output_files): |
| 19 for key in input_files.keys(): |
| 20 assert key not in output_files |
| 21 |
| 22 def test_template(self, input_files, output_files): |
| 23 for key in input_files.keys(): |
| 24 cleankey = os.path.splitext(key)[0] |
| 25 assert input_files[key] != output_files[cleankey] |
OLD | NEW |