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

Side by Side Diff: cms/tests/dynamic_tests/test_dynamic.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 urllib2
2 import os
3
4
5 class TestDynamic:
6 @classmethod
7 def run_test_server(cls):
8 import subprocess
9 import sys
10 sys.path.insert(0, '../')
11 return subprocess.Popen(
12 ['python', 'runserver.py', 'cms/tests/test_site']
13 )
14
15 def test_template(self, get_pages):
16 for page in get_pages:
17 url = 'http://localhost:5000/root/{}'\
Vasily Kuznetsov 2016/07/01 14:26:15 This code would be encapsulated in the `get_page`
Jon Sonesen 2016/07/01 15:58:13 Will do.
18 .format(os.path.splitext(page))
Sebastian Noack 2016/07/01 14:56:23 I wonder whether this code behaves as intended sin
Jon Sonesen 2016/07/01 15:58:13 the test server does return 200, and the page cont
19 response = urllib2.urlopen(url)
20 assert response.code == 200
OLDNEW

Powered by Google App Engine
This is Rietveld