Beispiel #1
0
def test_process_version_if_needed_success():
    """If the requirements are present we should write the version data"""
    notice_xml = NoticeXML(XMLBuilder().xml)
    notice_xml.effective = date(2001, 1, 1)
    notice_xml.fr_volume = 2
    notice_xml.start_page = 3
    entry.Notice('vvv').write(notice_xml)

    full_issuance.process_version_if_needed('title', 'part', 'vvv')

    result = entry.Version('title', 'part', 'vvv').read()
    assert result.identifier == 'vvv'
    assert result.effective == date(2001, 1, 1)
    assert result.fr_citation == Citation(2, 3)
Beispiel #2
0
def build(doc_number, effective_on, cfr_title, cfr_part):
    notice_xml = NoticeXML(etree.fromstring("""
        <ROOT>
            <AGENCY></AGENCY>
            <SUBJECT></SUBJECT>
        </ROOT>
    """))
    notice_xml.fr_volume = 10
    notice_xml.version_id = doc_number
    notice_xml.effective = effective_on
    notice_xml.published = effective_on
    notice_xml.start_page = 0
    notice_xml.end_page = 0
    notice_xml.cfr_refs = [TitlePartsRef(cfr_title, [cfr_part])]
    return notice_xml
def build(doc_number, effective_on, cfr_title, cfr_part):
    notice_xml = NoticeXML(
        etree.fromstring("""
        <ROOT>
            <AGENCY></AGENCY>
            <SUBJECT></SUBJECT>
        </ROOT>
    """))
    notice_xml.fr_volume = 10
    notice_xml.version_id = doc_number
    notice_xml.effective = effective_on
    notice_xml.published = effective_on
    notice_xml.start_page = 0
    notice_xml.end_page = 0
    notice_xml.cfr_refs = [TitlePartsRef(cfr_title, [cfr_part])]
    return notice_xml