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

Unified Diff: cms/tests/dynamic_tests/test_dynamic.py

Issue 29345468: Issue 4045 - Add Test Suite To CMS (Closed)
Patch Set: CMS Test Suite Conf and Some Tests Created June 29, 2016, 1:13 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cms/tests/dynamic_tests/conftest.py ('k') | cms/tests/static_tests/conftest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/tests/dynamic_tests/test_dynamic.py
===================================================================
new file mode 100644
--- /dev/null
+++ b/cms/tests/dynamic_tests/test_dynamic.py
@@ -0,0 +1,22 @@
+import urllib2
+import os
+
+
+class TestDynamic:
+ @classmethod
+ def run_test_server(cls):
+ import subprocess
+ import sys
+ sys.path.insert(0, '../')
+ sys.argv = ['filler', 'cms/tests/test_site', 'cms/tests/dynamic_tests']
+ return subprocess.Popen(['python', 'runserver.py',
+ 'cms/tests/test_site'
+ ]
+ )
+
+ def test_template(self, get_pages):
+ for page in get_pages:
+ url = 'http://localhost:5000/root/{}'\
+ .format(os.path.splitext(page))
+ response = urllib2.urlopen(url)
+ assert response.code == 200
« no previous file with comments | « cms/tests/dynamic_tests/conftest.py ('k') | cms/tests/static_tests/conftest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld