def test_gravatar_src_http(self): email = '*****@*****.**' result = gravatar_src(email, False) ok_(result.startswith('//www.gravatar.com')) # case insensitive eq_(result, gravatar_src(email.upper(), False))
def test_gravatar_src_https(self): email = '*****@*****.**' result = gravatar_src(email, True) ok_(result.startswith('//secure.gravatar.com'))
def test_gravatar_src_with_size(self): result = gravatar_src('*****@*****.**', False, size=50) ok_(result.startswith('//www.gravatar.com')) ok_('s=50' in result) eq_(result.count('?'), 1)