Skip to content

Commit 5a5289d

Browse files
committed
Added pip and setuptools, required in virtualenv, to requirements.txt in order to simplify buildbot testing of package installation and version testing.
- Legacy-Id: 9560
1 parent 60738dc commit 5a5289d

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

ietf/utils/test_utils.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import os
3636
import re
3737
import sys
38+
import html5lib
3839
from datetime import datetime
3940
import urllib2 as urllib
4041
from difflib import unified_diff
@@ -286,6 +287,8 @@ class TestCase(django.test.TestCase):
286287
We don't flush the database, as that triggers a re-load of initial_data.
287288
"""
288289

290+
parser = html5lib.HTMLParser(strict=True)
291+
289292
def _fixture_setup(self):
290293
global loaded_fixtures
291294

@@ -316,3 +319,15 @@ def _fixture_setup(self):
316319
loaded_fixtures += fixtures
317320

318321
super(TestCase, self)._fixture_setup()
322+
323+
324+
def assertValidHTML(self, data):
325+
try:
326+
parser.parse(data)
327+
except Exception as e:
328+
raise self.failureException(str(e))
329+
330+
def assertValidHTMLResponse(self, resp):
331+
self.assertHttpOK(resp)
332+
self.assertTrue(resp['Content-Type'].startswith('text/html'))
333+
self.assertValidHTML(resp.content)

ready-for-merge

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
# --- Add entries at the top ---
99

10-
personal/lars/6.0.2.dev0@9526
10+
personal/rjs/v6.0.2.dev0@9540:9542
11+
#personal/lars/6.0.2.dev0@9526
1112
personal/lars/6.0.2.dev0@9525
1213
personal/lars/6.0.2.dev0@9524
1314
personal/willem/v5.12.4.dev0@9316

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ html5lib>=0.90
1111
mimeparse>=0.1.3 # for TastPie
1212
MySQL-python>=1.2.5
1313
pathlib>=1.0
14+
pip>=6.0
1415
pyflakes>=0.8.1
1516
pyquery>1.2.4
1617
python-dateutil>=2.2
1718
python-magic>=0.4.6
1819
pytz>=2014.7
20+
setuptools>=1.2
1921
six>=1.8.0
2022
django-tastypie>=0.12.1
2123
wsgiref>=0.1.2

0 commit comments

Comments
 (0)