45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
from admin_analytics.irs990.titles import normalize_title
|
|
|
|
|
|
def test_president():
|
|
assert normalize_title("PRESIDENT") == "PRESIDENT"
|
|
assert normalize_title("President & CEO") == "PRESIDENT"
|
|
|
|
|
|
def test_vice_president_finance():
|
|
assert normalize_title("VICE PRESIDENT FOR FINANCE") == "VP_FINANCE"
|
|
assert normalize_title("VP Finance and Administration") == "VP_FINANCE"
|
|
assert normalize_title("EVP & VP for Business") == "VP_FINANCE"
|
|
|
|
|
|
def test_vice_president_other():
|
|
assert normalize_title("VICE PRESIDENT") == "VP_OTHER"
|
|
|
|
|
|
def test_provost():
|
|
assert normalize_title("PROVOST") == "PROVOST"
|
|
assert normalize_title("Executive Vice President and Provost") == "PROVOST"
|
|
|
|
|
|
def test_trustee():
|
|
assert normalize_title("TRUSTEE") == "TRUSTEE"
|
|
|
|
|
|
def test_dean():
|
|
assert normalize_title("DEAN OF ENGINEERING") == "DEAN"
|
|
|
|
|
|
def test_cfo():
|
|
assert normalize_title("CHIEF FINANCIAL OFFICER") == "CFO"
|
|
assert normalize_title("CFO") == "CFO"
|
|
|
|
|
|
def test_other():
|
|
assert normalize_title("ATHLETIC DIRECTOR") == "DIRECTOR"
|
|
assert normalize_title("FOOTBALL COACH") == "OTHER"
|
|
|
|
|
|
def test_none_and_empty():
|
|
assert normalize_title(None) is None
|
|
assert normalize_title("") is None
|
|
assert normalize_title(" ") is None
|