def test_api_key_invalid_length(self): with pytest.raises(exc.InvalidAPIKeyException): search('1234567890', 'www.google.com')
def test_api_key_valid(self): key = 'd08d2ba22218d1b59df239d03fc5e66adfaec2b2' result = search(key, 'www.google.com') assert result is not None
def test_api_key_empty(self): with pytest.raises(exc.InvalidAPIKeyException): search('', 'www.google.com')