Merge pull request #213 from postmasters/patch-1
Use truth test instead of length == 0
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index ef6ff85..54c1f76 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -4,7 +4,7 @@
2.0.34 (unreleased)
-------------------
-- Nothing changed yet.
+- Fix the test ``length == 0`` in ``check_content_type``.
2.0.33 (2019-02-09)
diff --git a/webtest/lint.py b/webtest/lint.py
index 8d28103..a12a923 100644
--- a/webtest/lint.py
+++ b/webtest/lint.py
@@ -534,7 +534,7 @@
if name.lower() == 'content-type':
if code not in NO_MESSAGE_TYPE:
return
- elif length == 0:
+ elif not length:
warnings.warn(("Content-Type header found in a %s response, "
"which not return content.") % code,
WSGIWarning)