diff options
| author | Gael Pasgrimaud <gael@gawel.org> | 2019-04-11 10:00:06 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-11 10:00:06 +0200 |
| commit | ff755bc0704260411252f36e0fd83a76af1201db (patch) | |
| tree | e63f4adbab8d2c3a4cb9f7ffe3965a7c63ad5d6a /webtest | |
| parent | ff077e24b83efb35dd82412f4f4ff0c2122b9074 (diff) | |
| parent | 15d87c252ba6e20a0da4cf667f899a2e7bca48fe (diff) | |
| download | webtest-ff755bc0704260411252f36e0fd83a76af1201db.tar.gz | |
Merge pull request #213 from postmasters/patch-1
Use truth test instead of length == 0
Diffstat (limited to 'webtest')
| -rw-r--r-- | webtest/lint.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ def check_content_type(status, headers): 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) |
