File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55from io import BytesIO
66from jsonschema import Draft7Validator , draft7_format_checker , RefResolver
7+ #from jsonschema import Draft7Validator, FormatChecker, RefResolver
8+ format_checker = Draft7Validator .FORMAT_CHECKER
79from lxml import etree
810from urllib .request import pathname2url
911
Original file line number Diff line number Diff line change @@ -77,8 +77,11 @@ def get_date_time(dt_str):
7777 """
7878 for fmt in DATE_FORMATS :
7979 try :
80+ #print(f"Trying format: {fmt}")
8081 date_time = datetime .strptime (dt_str , fmt )
81- return date_time
82+ #return date_time
83+ return date_time .strftime ("%Y-%m-%dT%H:%M:%SZ" )
8284 except ValueError :
8385 continue
84- return None
86+ return False , None
87+ #return None
Original file line number Diff line number Diff line change 1+ [pytest]
2+ filterwarnings =
3+ ignore:ssl\.PROTOCOL_TLS is deprecated:DeprecationWarning
4+ ignore:ssl\.match_hostname\(\) is deprecated:DeprecationWarning
5+ ignore:Accessing jsonschema\.draft7_format_checker is deprecated:DeprecationWarning
Original file line number Diff line number Diff line change 11from pyQuARC .code .downloader import Downloader
2+ #import warnings # new
3+ #import pytest # new
4+ #warnings.filterwarnings("ignore", category=DeprecationWarning) #new
5+
26
37
48class TestDownloader :
@@ -9,11 +13,11 @@ class TestDownloader:
913 def setup_method (self ):
1014 self .concept_ids = {
1115 "collection" : {
12- "real" : "C1339230297-GES_DISC " ,
16+ "real" : "C1620496172-CDDIS " ,
1317 "dummy" : "C123456-LPDAAC_ECS" ,
1418 },
1519 "granule" : {
16- "real" : "G1370895082-GES_DISC " ,
20+ "real" : "G2128996127-CDDIS " ,
1721 "dummy" : "G1000000002-CMR_PROV" ,
1822 },
1923 "invalid" : "asdfasdf" ,
@@ -134,7 +138,7 @@ def test_download_real_collection_no_errors(self):
134138 downloader = Downloader (real_collection , "echo-c" )
135139
136140 downloader .download ()
137-
141+ print ( downloader )
138142 # is the concept id valid and is the request going through?
139143 assert downloader .errors == []
140144
You can’t perform that action at this time.
0 commit comments