def test_section_blank_paragraph_ids(self): no_ids_ref = '1002.1()' test_url = get_url(no_ids_ref) self.assertEqual(test_url, REG_BASE.format('1002/1'))
def test_part_number_not_in_whitelist(self): bad_ref = '1017.5(d)(1)' test_url = get_url(bad_ref) self.assertIs(test_url, None)
def test_section_with_paragraph_ids(self): ref_with_id = '1002.1(a)' test_url = get_url(ref_with_id) self.assertEqual(test_url, REG_BASE.format('1002/1') + '#a')
def test_bad_part_number_is_skipped(self): bad_ref = '99.5(d)(1)' test_url = get_url(bad_ref) self.assertIs(test_url, None)