OLD | NEW |
(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 sys.argv = ['filler', 'cms/tests/test_site', 'cms/tests/dynamic_tests'] |
| 12 return subprocess.Popen(['python', 'runserver.py', |
| 13 'cms/tests/test_site' |
| 14 ] |
| 15 ) |
| 16 |
| 17 def test_template(self, get_pages): |
| 18 for page in get_pages: |
| 19 url = 'http://localhost:5000/root/{}'\ |
| 20 .format(os.path.splitext(page)) |
| 21 response = urllib2.urlopen(url) |
| 22 assert response.code == 200 |
OLD | NEW |