From c0cf218f2027c820c5cb6ee35fc3a93c96ee0bc6 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Wed, 3 Aug 2016 17:42:15 -0400 Subject: [PATCH] Failing tests for lookup.json restrictions --- tests/py/test_lookup_json.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/py/test_lookup_json.py b/tests/py/test_lookup_json.py index 6b4c0253ee..35fe290a91 100644 --- a/tests/py/test_lookup_json.py +++ b/tests/py/test_lookup_json.py @@ -33,3 +33,25 @@ def test_looking_up_searchable_user_with_an_exact_match_finds_them(self): def test_looking_up_searchable_user_without_an_exact_match_finds_them(self): alice = self.make_participant("alice", claimed_time='now') assert self.lookup('alic') == [alice.id, -1] + + + def test_looking_up_suspicious_user_finds_nothing(self): + self.make_participant( "alice" + , claimed_time='now' + , verified_in='TT' + , email_address='alice@example.com' + , is_suspicious=True + ) + assert self.lookup('alice') == [] + + def test_looking_up_unverified_user_finds_nothing(self): + self.make_participant("alice", claimed_time='now', email_address='alice@example.com') + assert self.lookup('alice') == [] + + def test_looking_up_user_with_no_email_finds_nothing(self): + self.make_participant("alice", claimed_time='now') # can't verify w/o email! + assert self.lookup('alice') == [] + + def test_looking_up_unclaimed_user_finds_nothing(self): + self.make_participant("alice", verified_in='TT', email_address='alice@example.com') + assert self.lookup('alice') == []