Add check for whitelist regex term

This verifies the regex for whitelist functions as expected.

BUG=b:172602552
TEST=./blocked_terms_unittest.py

Change-Id: Ib2bc659c7e94d0ac0128daf7475a95cc012d5eb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/repohooks/+/2522152
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Bernie Thompson <bhthompson@chromium.org>
Tested-by: Bernie Thompson <bhthompson@chromium.org>
diff --git a/blocked_terms_unittest.py b/blocked_terms_unittest.py
index d50cf63..c331bec 100755
--- a/blocked_terms_unittest.py
+++ b/blocked_terms_unittest.py
@@ -121,6 +121,24 @@
     }
     self.CheckKeyword(test_instance_unblocked)
 
+  def test_whitelist_keyword(self):
+    test_instance_blocked = {
+        self.DIFF: [(1, 'blocked white list '),
+                    (2, 'blocked white-list'),
+                    (3, 'blocked whitelist'),
+                    (4, 'blocked _whitelist'),
+                    (5, 'blocked whitelist1'),
+                    (6, 'blocked whitelisted'),],
+        self.MATCH: 6,
+    }
+    self.CheckKeyword(test_instance_blocked)
+
+    test_instance_unblocked = {
+        self.DIFF: [(1, 'unblocked white dog list'),],
+        self.MATCH: 0,
+    }
+    self.CheckKeyword(test_instance_unblocked)
+
 
 if __name__ == '__main__':
   cros_test_lib.main(module=__name__)