def test_web_user_owner_nomatch(self): self.assertFalse(is_valid_owner(_mk_web_user(domains=['match', 'match2']), 'nomatch'))
def test_user_owner_nomatch(self): self.assertFalse(is_valid_owner(_mk_user(domain='match'), 'nomatch'))
def test_web_user_owner_match(self): self.assertTrue(is_valid_owner(_mk_web_user(domains=['match', 'match2']), 'match')) self.assertTrue(is_valid_owner(_mk_web_user(domains=['match', 'match2']), 'match2'))
def test_user_owner_match(self): self.assertTrue(is_valid_owner(_mk_user(domain='match'), 'match'))
def test_web_user_owner_nomatch(self): self.assertFalse( is_valid_owner(_mk_web_user(domains=['match', 'match2']), 'nomatch'))
def test_web_user_owner_match(self): self.assertTrue( is_valid_owner(_mk_web_user(domains=['match', 'match2']), 'match')) self.assertTrue( is_valid_owner(_mk_web_user(domains=['match', 'match2']), 'match2'))