def test_shorter_catechism_all_exists(): for question in range(1, 107): assert data.get_catechism('wsc', str(question)) with pytest.raises(KeyError): data.get_catechism('wsc', '108') with pytest.raises(KeyError): data.get_catechism('wsc', '0')
def test_larger_catechism_all_exists(): for question in range(1, 197): assert data.get_catechism('wlc', str(question)) with pytest.raises(KeyError): data.get_catechism('wlc', '198') with pytest.raises(KeyError): data.get_catechism('wlc', '0')
def test_larger_catechism_q1(): wlc11 = data.get_catechism('wlc', '1') assert wlc11['type'] == 'catechism' assert wlc11['abbv'] == 'wlc' assert wlc11['name'] == 'Larger Catechism' assert wlc11['section_title'] == '' assert wlc11['number'] == '1' assert wlc11['citation'] == 'WLC 1' assert wlc11['long_citation'] == 'Larger Catechism 1' assert strip_html_tags(wlc11['answer']) == """Man's chief and highest end is to glorify God,1 and fully to enjoy him forever.2""" assert wlc11['question'] == 'What is the chief and highest end of man?'