git-cola v4.0.0
[git-cola.git] / test / gravatar_test.py
blobe3bb7809332812c5e978bd92e46280dbf51d2c9b
1 from __future__ import absolute_import, division, print_function, unicode_literals
3 from cola import gravatar
4 from cola.compat import ustr
7 def test_url_for_email_():
8 email = 'email@example.com'
9 expect = (
10 r'https://gravatar.com/avatar/'
11 r'5658ffccee7f0ebfda2b226238b1eb6e'
12 r'?s=64'
13 r'&d=https%3A%2F%2Fgit-cola.github.io'
14 r'%2Fimages%2Fgit-64x64.jpg'
16 actual = gravatar.Gravatar.url_for_email(email, 64)
17 assert expect == actual
18 assert isinstance(actual, ustr)