Skip to content
Browse files

*html* output is also testable

  • Loading branch information...
1 parent fa8bb8f commit 8052af821c0802ed257d0272c0a6c30d022f7dcd @stargazer committed Apr 20, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 icetea/tests.py
View
5 icetea/tests.py
@@ -150,7 +150,7 @@ def analyze(self, response):
Returns the type and length of the ``response``
Status code 200: 'populated_dict', 'empty_dict', 'populated_list',
- 'empty_list', 'attachment'
+ 'empty_list', 'attachment', 'html'
Status code 400: 'bad_request'
Status code 405: 'not_allowed'
Status code 410: 'gone'
@@ -165,6 +165,9 @@ def analyze(self, response):
if 'Content-Disposition' in response:
type = 'attachment'
length = None
+ elif response.get('Content-Type', None) == 'text/html':
+ type = 'html'
+ length = None
else:
if isinstance(content, dict):
if len(content) == 0:

0 comments on commit 8052af8

Please sign in to comment.
Something went wrong with that request. Please try again.