File: gravatar_test.py

package info (click to toggle)
git-cola 4.13.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 6,480 kB
  • sloc: python: 36,938; sh: 304; makefile: 223; xml: 100; tcl: 62
file content (13 lines) | stat: -rw-r--r-- 407 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from cola import gravatar
from cola.compat import ustr


def test_url_for_email_():
    email = 'email@example.com'
    expect = (
        'https://gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e?s=64'
        + r'&d=https%3A%2F%2Fgit-cola.github.io%2Fimages%2Fgit-64x64.jpg'
    )
    actual = gravatar.Gravatar.url_for_email(email, 64)
    assert expect == actual
    assert isinstance(actual, ustr)