Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/c/a/cablemap-HEAD/cablemap.core/tests/test_utils_signer_name.py   cablemap(Download)
"""
from nose.tools import eq_
from cablemap.core.utils import signer_name
 
_TEST_DATA = (
    def check(sign, canonical_id, expected):
        eq_(expected, signer_name(sign, canonical_id))
    for canonical_id, sign, expected in _TEST_DATA:
        yield check, sign, canonical_id, expected
 
def test_default():
    eq_('bar', signer_name(u'FOO', u'98BERLIN1234', 'bar'))
    eq_(None, signer_name(u'FOO', u'98BERLIN1234'))
    eq_(u'FOO', signer_name(u'FOO', u'98BERLIN1234', u'FOO'))