def test_param_for_user_with_no_secondary(): expected = long(hashlib.sha1('feature.key.abc.xyz').hexdigest()[:15], 16) / float(0xFFFFFFFFFFFFFFF) assert ldclient._param_for_user(minimal_feature, {u'key': u'xyz'}) == expected
def test_param_for_user_with_no_key(): assert ldclient._param_for_user(minimal_feature, {}) is None