2323 'ia' : MementoIndexSource .from_timegate_url ('http://web.archive.org/web/' ),
2424 'ait' : MementoIndexSource .from_timegate_url ('http://wayback.archive-it.org/all/' ),
2525 'bl' : MementoIndexSource .from_timegate_url ('http://www.webarchive.org.uk/wayback/archive/' ),
26- 'rhiz' : MementoIndexSource .from_timegate_url ('https://webenact .rhizome.org/vvork/' , path = '*' )
26+ 'rhiz' : MementoIndexSource .from_timegate_url ('https://webarchives .rhizome.org/vvork/' , path = '*' )
2727}
2828
2929aggs = {'simple' : SimpleAggregator (sources ),
@@ -59,7 +59,7 @@ def test_mem_agg_index_1(self, agg):
5959
6060 assert (to_json_list (res ) == exp )
6161 assert (errs == {'bl' : "NotFoundException('http://www.webarchive.org.uk/wayback/archive/http://iana.org/',)" ,
62- 'rhiz' : "NotFoundException('https://webenact .rhizome.org/vvork/http://iana.org/',)" })
62+ 'rhiz' : "NotFoundException('https://webarchives .rhizome.org/vvork/http://iana.org/',)" })
6363
6464
6565 @pytest .mark .parametrize ("agg" , list (aggs .values ()), ids = list (aggs .keys ()))
@@ -77,7 +77,7 @@ def test_mem_agg_index_2(self, agg):
7777 ]
7878
7979 assert (to_json_list (res ) == exp )
80- assert (errs == {'rhiz' : "NotFoundException('https://webenact .rhizome.org/vvork/http://example.com/',)" })
80+ assert (errs == {'rhiz' : "NotFoundException('https://webarchives .rhizome.org/vvork/http://example.com/',)" })
8181
8282
8383 @pytest .mark .parametrize ("agg" , list (aggs .values ()), ids = list (aggs .keys ()))
@@ -86,11 +86,13 @@ def test_mem_agg_index_3(self, agg):
8686 url = 'http://vvork.com/'
8787 res , errs = agg (dict (url = url , closest = '20141001' , limit = 5 ))
8888
89- exp = [{"timestamp" : "20141006184357" , "load_url" : "https://webenact.rhizome.org/vvork/20141006184357id_/http://www.vvork.com/" , "source" : "rhiz" },
89+ exp = [
90+ {"timestamp" : "20141006184357" , "load_url" : "https://webarchives.rhizome.org/vvork/20141006184357id_/http://www.vvork.com/" , "source" : "rhiz" },
9091 {"timestamp" : "20141018133107" , "load_url" : "http://web.archive.org/web/20141018133107id_/http://vvork.com/" , "source" : "ia" },
9192 {"timestamp" : "20141020161243" , "load_url" : "http://web.archive.org/web/20141020161243id_/http://vvork.com/" , "source" : "ia" },
9293 {"timestamp" : "20140806161228" , "load_url" : "http://web.archive.org/web/20140806161228id_/http://vvork.com/" , "source" : "ia" },
93- {"timestamp" : "20131004231540" , "load_url" : "http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/" , "source" : "ait" }]
94+ {"timestamp" : "20131004231540" , "load_url" : "http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/" , "source" : "ait" },
95+ ]
9496
9597 assert (to_json_list (res ) == exp )
9698 assert (errs == {})
@@ -102,8 +104,10 @@ def test_mem_agg_index_4(self, agg):
102104 url = 'http://vvork.com/'
103105 res , errs = agg (dict (url = url , closest = '20141001' , limit = 2 , sources = 'rhiz,ait' ))
104106
105- exp = [{"timestamp" : "20141006184357" , "load_url" : "https://webenact.rhizome.org/vvork/20141006184357id_/http://www.vvork.com/" , "source" : "rhiz" },
106- {"timestamp" : "20131004231540" , "load_url" : "http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/" , "source" : "ait" }]
107+ exp = [
108+ {"timestamp" : "20141006184357" , "load_url" : "https://webarchives.rhizome.org/vvork/20141006184357id_/http://www.vvork.com/" , "source" : "rhiz" },
109+ {"timestamp" : "20131004231540" , "load_url" : "http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/" , "source" : "ait" },
110+ ]
107111
108112 assert (to_json_list (res ) == exp )
109113 assert (errs == {})
@@ -167,7 +171,7 @@ def _test_handler_output_cdxj(self):
167171 headers , res , errs = handler (dict (url = url , closest = '20141001' , limit = 2 , sources = 'rhiz,ait' ))
168172
169173 exp = b"""\
170- com,vvork)/ 20141006184357 {"url": "http://www.vvork.com/", "mem_rel": "memento", "memento_url": "https://webenact .rhizome.org/vvork/20141006184357/http://www.vvork.com/", "load_url": "https://webenact .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/", "source": "rhiz"}
174+ com,vvork)/ 20141006184357 {"url": "http://www.vvork.com/", "mem_rel": "memento", "memento_url": "https://webarchives .rhizome.org/vvork/20141006184357/http://www.vvork.com/", "load_url": "https://webarchives .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/", "source": "rhiz"}
171175com,vvork)/ 20131004231540 {"url": "http://vvork.com/", "mem_rel": "last memento", "memento_url": "http://wayback.archive-it.org/all/20131004231540/http://vvork.com/", "load_url": "http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/", "source": "ait"}
172176"""
173177
@@ -183,7 +187,7 @@ def _test_handler_output_json(self):
183187 headers , res , errs = handler (dict (url = url , closest = '20141001' , limit = 2 , sources = 'rhiz,ait' , output = 'json' ))
184188
185189 exp = b"""\
186- {"urlkey": "com,vvork)/", "timestamp": "20141006184357", "url": "http://www.vvork.com/", "mem_rel": "memento", "memento_url": "https://webenact .rhizome.org/vvork/20141006184357/http://www.vvork.com/", "load_url": "https://webenact .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/", "source": "rhiz"}
190+ {"urlkey": "com,vvork)/", "timestamp": "20141006184357", "url": "http://www.vvork.com/", "mem_rel": "memento", "memento_url": "https://webarchives .rhizome.org/vvork/20141006184357/http://www.vvork.com/", "load_url": "https://webarchives .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/", "source": "rhiz"}
187191{"urlkey": "com,vvork)/", "timestamp": "20131004231540", "url": "http://vvork.com/", "mem_rel": "last memento", "memento_url": "http://wayback.archive-it.org/all/20131004231540/http://vvork.com/", "load_url": "http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/", "source": "ait"}
188192"""
189193
@@ -198,7 +202,7 @@ def _test_handler_output_link(self):
198202 headers , res , errs = handler (dict (url = url , closest = '20141001' , limit = 2 , sources = 'rhiz,ait' , output = 'link' ))
199203
200204 exp = b"""\
201- <https://webenact .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/>; rel="memento"; datetime="Mon, 06 Oct 2014 18:43:57 GMT"; src="rhiz",
205+ <https://webarchives .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/>; rel="memento"; datetime="Mon, 06 Oct 2014 18:43:57 GMT"; src="rhiz",
202206<http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/>; rel="memento"; datetime="Fri, 04 Oct 2013 23:15:40 GMT"; src="ait"
203207"""
204208 assert (headers ['Content-Type' ] == 'application/link' )
@@ -223,7 +227,7 @@ def _test_handler_output_link_2(self):
223227 assert (b'' .join (res ) == exp )
224228
225229 exp_errs = {'bl' : "NotFoundException('http://www.webarchive.org.uk/wayback/archive/http://iana.org/',)" ,
226- 'rhiz' : "NotFoundException('https://webenact .rhizome.org/vvork/http://iana.org/',)" }
230+ 'rhiz' : "NotFoundException('https://webarchives .rhizome.org/vvork/http://iana.org/',)" }
227231
228232 assert (errs == exp_errs )
229233
@@ -242,7 +246,7 @@ def _test_handler_output_link_3(self):
242246 exp_errs = {'ait' : "NotFoundException('http://wayback.archive-it.org/all/http://foo.bar.non-existent',)" ,
243247 'bl' : "NotFoundException('http://www.webarchive.org.uk/wayback/archive/http://foo.bar.non-existent',)" ,
244248 'ia' : "NotFoundException('http://web.archive.org/web/http://foo.bar.non-existent',)" ,
245- 'rhiz' : "NotFoundException('https://webenact .rhizome.org/vvork/http://foo.bar.non-existent',)" }
249+ 'rhiz' : "NotFoundException('https://webarchives .rhizome.org/vvork/http://foo.bar.non-existent',)" }
246250
247251 assert (errs == exp_errs )
248252
@@ -253,7 +257,7 @@ def _test_handler_output_text(self):
253257 headers , res , errs = handler (dict (url = url , closest = '20141001' , limit = 2 , sources = 'rhiz,ait' , output = 'text' ))
254258
255259 exp = b"""\
256- com,vvork)/ 20141006184357 http://www.vvork.com/ memento https://webenact .rhizome.org/vvork/20141006184357/http://www.vvork.com/ https://webenact .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/ rhiz
260+ com,vvork)/ 20141006184357 http://www.vvork.com/ memento https://webarchives .rhizome.org/vvork/20141006184357/http://www.vvork.com/ https://webarchives .rhizome.org/vvork/20141006184357id_/http://www.vvork.com/ rhiz
257261com,vvork)/ 20131004231540 http://vvork.com/ last memento http://wayback.archive-it.org/all/20131004231540/http://vvork.com/ http://wayback.archive-it.org/all/20131004231540id_/http://vvork.com/ ait
258262"""
259263 assert (headers ['Content-Type' ] == 'text/plain' )
0 commit comments