def test_build_archives_ex_3_1(self): """Resource List Archive listing 3 Resource Lists""" rla = ResourceListArchive() rla.up = 'http://example.com/dataset1/capabilitylist.xml' rla.add( Resource( uri='http://example.com/resourcelist1.xml', md_at='2012-11-03T09:00:00Z') ) rla.add( Resource( uri='http://example.com/resourcelist2.xml', md_at='2012-12-03T09:00:00Z') ) rla.add( Resource( uri='http://example.com/resourcelist3.xml', md_at='2013-01-03T09:00:00Z') ) ex_xml = self._open_ex('archives_ex_3_1').read() self._assert_xml_equal( rla.as_xml(), ex_xml )
def test_build_archives_ex_3_2(self): """Resource List Archive Index listing 2 component Resource List Archives""" rlai = ResourceListArchive() rlai.sitemapindex = True rlai.up = 'http://example.com/dataset1/capabilitylist.xml' rlai.add( Resource(uri='http://example.com/resourcelistarchive00001.xml')) rlai.add( Resource(uri='http://example.com/resourcelistarchive00002.xml')) ex_xml = self._open_ex('archives_ex_3_2').read() self._assert_xml_equal(rlai.as_xml(), ex_xml)
def test_build_archives_ex_3_2(self): """Resource List Archive Index listing 2 component Resource List Archives""" rlai = ResourceListArchive() rlai.sitemapindex = True rlai.up = 'http://example.com/dataset1/capabilitylist.xml' rlai.add( Resource( uri='http://example.com/resourcelistarchive00001.xml' )) rlai.add( Resource( uri='http://example.com/resourcelistarchive00002.xml' )) ex_xml = self._open_ex('archives_ex_3_2').read() self._assert_xml_equal( rlai.as_xml(), ex_xml )