def test_build_ex_18(self):
     """Resource Dump Manifest with 2 entries and some metadata"""
     rdm = ResourceDumpManifest()
     rdm.up = 'http://example.com/dataset1/capabilitylist.xml'
     rdm.md_at = "2013-01-03T09:00:00Z"
     rdm.md_completed = "2013-01-03T09:02:00Z"
     rdm.add(
         Resource(uri='http://example.com/res1',
                  lastmod='2013-01-02T13:00:00Z',
                  md5='1584abdf8ebdc9802ac0c6a7402c03b6',
                  length=8876,
                  mime_type='text/html',
                  path='/resources/res1'))
     rdm.add(
         Resource(
             uri='http://example.com/res2',
             lastmod='2013-01-02T14:00:00Z',
             md5='1e0d5cb8ef6ba40c99b14c0237be735e',
             sha256=
             '854f61290e2e197a11bc91063afce22e43f8ccc655237050ace766adc68dc784',
             length=14599,
             mime_type='application/pdf',
             path='/resources/res2'))
     ex_xml = self._open_ex('resourcesync_ex_18').read()
     self._assert_xml_equal(rdm.as_xml(), ex_xml)
Beispiel #2
0
 def test_build_ex_05(self):
     """Simple Resource Dump Manifest document """
     rdm = ResourceDumpManifest()
     rdm.md_at = '2013-01-03T09:00:00Z'
     rdm.add( Resource(uri='http://example.com/res1',
                       lastmod='2013-01-03T03:00:00Z',
                       md5='1584abdf8ebdc9802ac0c6a7402c03b6',
                       path='/resources/res1') )
     rdm.add( Resource(uri='http://example.com/res2',
                       lastmod='2013-01-03T04:00:00Z',
                       md5='1e0d5cb8ef6ba40c99b14c0237be735e',
                       path='/resources/res2') )
     ex_xml = self._open_ex('resourcesync_ex_5').read()
     self._assert_xml_equal( rdm.as_xml(), ex_xml )
Beispiel #3
0
 def test_build_ex_18(self):
     """Resource Dump Manifest with 2 entries and some metadata"""
     rdm = ResourceDumpManifest()
     rdm.up='http://example.com/dataset1/capabilitylist.xml'
     rdm.md_at="2013-01-03T09:00:00Z"
     rdm.md_completed="2013-01-03T09:02:00Z"
     rdm.add( Resource( uri='http://example.com/res1',
                        lastmod='2013-01-02T13:00:00Z',
                        md5='1584abdf8ebdc9802ac0c6a7402c03b6',
                        length=8876,
                        mime_type='text/html',
                        path='/resources/res1') )
     rdm.add( Resource( uri='http://example.com/res2',
                        lastmod='2013-01-02T14:00:00Z',
                        md5='1e0d5cb8ef6ba40c99b14c0237be735e',
                        sha256='854f61290e2e197a11bc91063afce22e43f8ccc655237050ace766adc68dc784',
                        length=14599,
                        mime_type='application/pdf',
                        path='/resources/res2') )
     ex_xml = self._open_ex('resourcesync_ex_18').read()
     self._assert_xml_equal( rdm.as_xml(), ex_xml )