Пример #1
0
def test_param_for_user_with_no_secondary():
    expected = int(hashlib.sha1('feature.key.abc.xyz'.encode('utf-8')).hexdigest()[:15], 16) / float(0xFFFFFFFFFFFFFFF)
    assert util._param_for_user(minimal_feature, {u'key': u'xyz'}) == expected
Пример #2
0
def test_param_for_user_with_no_secondary():
    expected = int(
        hashlib.sha1('feature.key.abc.xyz'.encode('utf-8')).hexdigest()[:15],
        16) / float(0xFFFFFFFFFFFFFFF)
    assert util._param_for_user(minimal_feature, {u'key': u'xyz'}) == expected
Пример #3
0
def test_param_for_user_with_no_key():
    assert util._param_for_user(minimal_feature, {}) is None
Пример #4
0
def test_param_for_user_with_no_key():
    assert util._param_for_user(minimal_feature, {}) is None