from maps.wikimap.stat.libs.gdpr.lib.gdpr import uid_from_gdpr_str

import pytest


def test_should_comvert_normal_uid():
    assert uid_from_gdpr_str('42') == 42


def test_should_convert_negative_uid():
    assert uid_from_gdpr_str('-42') == 42


def test_should_fail_converting_nan():
    with pytest.raises(ValueError):
        uid_from_gdpr_str('str')
