From 3be0f0d6955a0f638cd6a5f6f96e3ee0fdd12921 Mon Sep 17 00:00:00 2001 From: Thomi Richards Date: Mon, 15 Jun 2015 14:56:16 +1200 Subject: [PATCH] Fix bug in SubjectContains test. --- gmailfilter/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gmailfilter/test.py b/gmailfilter/test.py index 87d3a49..126af74 100644 --- a/gmailfilter/test.py +++ b/gmailfilter/test.py @@ -139,9 +139,9 @@ def __init__(self, search_string, case_sensitive=False): def match(self, message): subject = message.get_headers()['Subject'] if self._case_sensitive: - return subject.contains(self._search_string) + return self._search_string in subject else: - return sobject.casefold().contains(self._search_string.casefold()) + return self._search_string.casefold() in subject.casefold() class ListId(Test):