[pre-commit.ci] auto fixes from pre-commit.com hooks
[git-cola.git] / test / gravatar_test.py
blob22a1dc941c2adb49f53a9da61284f72cbfc6813c
1 from cola import gravatar
2 from cola.compat import ustr
5 def test_url_for_email_():
6 email = 'email@example.com'
7 expect = (
8 'https://gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e?s=64'
9 + r'&d=https%3A%2F%2Fgit-cola.github.io%2Fimages%2Fgit-64x64.jpg'
11 actual = gravatar.Gravatar.url_for_email(email, 64)
12 assert expect == actual
13 assert isinstance(actual, ustr)