File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -753,6 +753,9 @@ def _parse_staging_request_page(self, data_list_page):
753753 except ValueError :
754754 # size is probably a string?
755755 columns ['size' ].append (- 1 * u .byte )
756+ log .log (level = 5 , msg = "Found a new-style entry. "
757+ "size={0} uid={1} url={2}" .format (size , uid ,
758+ columns ['URL' ][- 1 ]))
756759 else :
757760 log .warn ("Access to {0} is not authorized." .format (uid ))
758761 elif len (tds ) > 3 and tds [2 ].find ('a' ):
@@ -765,6 +768,9 @@ def _parse_staging_request_page(self, data_list_page):
765768 else u .Unit ('kB' ) if 'kb' in unit .lower ()
766769 else 1 )
767770 columns ['size' ].append (float (size )* u .Unit (unit ))
771+ log .log (level = 5 , msg = "Found an old-style entry. "
772+ "size={0} uid={1} url={2}" .format (size , uid ,
773+ columns ['URL' ][- 1 ]))
768774
769775 columns ['size' ] = u .Quantity (columns ['size' ], u .Gbyte )
770776
Original file line number Diff line number Diff line change @@ -132,20 +132,23 @@ def test_cycle0(self, temp_dir):
132132 result = alma .query (payload = payload )
133133 assert len (result ) == 1
134134
135- uid_url_table_mous = alma ().stage_data (result ['Member_ous_id' ])
136- uid_url_table_asdm = alma ().stage_data (result ['Asdm_uid' ])
135+ alma1 = alma ()
136+ alma2 = alma ()
137+ uid_url_table_mous = alma1 .stage_data (result ['Member_ous_id' ])
138+ uid_url_table_asdm = alma2 .stage_data (result ['Asdm_uid' ])
137139 assert len (uid_url_table_asdm ) == 1
138140 assert len (uid_url_table_mous ) == 32
139141
140- assert uid_url_table_mous [0 ]['URL' ] == 'https://almascience.eso.org/dataPortal/requests/anonymous/787632764/ALMA/2011.0.00121.S_2012-08-16_001_of_002.tar/ 2011.0.00121.S_2012-08-16_001_of_002.tar'
142+ assert uid_url_table_mous [0 ]['URL' ]. split ( "/" )[ - 1 ] == '2011.0.00121.S_2012-08-16_001_of_002.tar'
141143 assert uid_url_table_mous [0 ]['uid' ] == 'uid://A002/X327408/X246'
142144
143145 small = uid_url_table_mous ['size' ] < 1
144146
145147 urls_to_download = uid_url_table_mous [small ]['URL' ]
146148 data = alma .download_and_extract_files (urls_to_download )
147149
148- assert len (data ) == 10
150+ # There are 10 small files, but only 8 unique
151+ assert len (data ) == 8
149152
150153 def test_help (self ):
151154
You can’t perform that action at this time.
0 commit comments