def test_reform_pkey_year(): with pytest.raises(ValueError): rdict = Policy._reform_pkey_year({4567: {2013: [40000]}}) with pytest.raises(ValueError): rdict = Policy._reform_pkey_year({'_II_em': 40000}) with pytest.raises(ValueError): rdict = Policy._reform_pkey_year({'_II_em': {'2013': [40000]}})