Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: cms/tests/static_tests/test_module.py

Issue 29345468: Issue 4045 - Add Test Suite To CMS (Closed)
Patch Set: fix Popen object return Created June 29, 2016, 1:23 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(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]
OLDNEW

Powered by Google App Engine
This is Rietveld