@@ -67,37 +67,6 @@ def getsiteid(self):
67
67
return "PDS_ATM"
68
68
69
69
70
- class LADEESIPWithBadbaseurlTest (LADEESIPTest ):
71
- """This is the test fixture for LADEE SIPs but with bad base URLS."""
72
-
73
- def setUp (self ):
74
- """Set up this text fixture."""
75
- super (LADEESIPWithBadbaseurlTest , self ).setUp ()
76
- from zope .component import provideUtility # type: ignore
77
- from pds2 .aipgen .utils import URLValidator
78
-
79
- self .validator = URLValidator ()
80
- provideUtility (self .validator )
81
-
82
- def tearDown (self ):
83
- """Tear down this text fixture."""
84
- del self .validator
85
- super (LADEESIPWithBadbaseurlTest , self ).tearDown ()
86
-
87
- def getbaseurl (self ):
88
- """Get the base URL."""
89
- # This should always be a non-existent path no matter where this test is being run.
90
- # If you go out of your way to actually create this path on your system, please take
91
- # a moment to question your other life choices 🧐
92
- return "file:/definitely/a/non/exist/int/path/prefix/"
93
-
94
- # https://github.com/NASA-PDS/pds-deep-archive/issues/102
95
- def test_sip (self ):
96
- """Make sure that the SIP generation fails with a URLError due to a non-existent base URL."""
97
- with self .assertRaises (URLError ):
98
- super (LADEESIPWithBadbaseurlTest , self ).test_sip ()
99
-
100
-
101
70
class LADEEAIPTest (AIPFunctionalTestCase ):
102
71
"""Test case for AIP generation for all collections from the LADEE test bundle."""
103
72
@@ -325,21 +294,77 @@ def getmanifests(self):
325
294
return (base + "checksum_manifest_v1.0.tab" , base + "transfer_manifest_v1.0.tab" )
326
295
327
296
297
+ class NAIF3SIPWithBadbaseurlTest (SIPFunctionalTestCase ):
298
+ """This is the test fixture for NAIF3 SIPs but with bad base URLs."""
299
+
300
+ @classmethod
301
+ def setUpClass (cls ):
302
+ """Override the abstract base class which just skips itself."""
303
+ pass
304
+
305
+ def getbundlefile (self ):
306
+ """Get the bundle file."""
307
+ return "data/naif3/bundle_mars2020_spice_v003.xml"
308
+
309
+ def getallcollectionsflag (self ):
310
+ """Get the all collections flag."""
311
+ return True
312
+
313
+ def getvalidsipfilename (self ):
314
+ """Get the valid SIP file name.
315
+
316
+ This doesn't really matter because the goal is to raise a URLError when the SIP
317
+ is generated.
318
+ """
319
+ return "does/not/matter.tab"
320
+
321
+ def getsiteid (self ):
322
+ """Get the site ID."""
323
+ return "PDS_ATM"
324
+
325
+ def setUp (self ):
326
+ """Set up this text fixture."""
327
+ super ().setUp ()
328
+ from zope .component import provideUtility # type: ignore
329
+ from pds2 .aipgen .utils import URLValidator
330
+
331
+ self .validator = URLValidator ()
332
+ provideUtility (self .validator )
333
+
334
+ def tearDown (self ):
335
+ """Tear down this text fixture."""
336
+ del self .validator
337
+ super ().tearDown ()
338
+
339
+ def getbaseurl (self ):
340
+ """Get the base URL."""
341
+ # This should always be a non-existent path no matter where this test is being run.
342
+ # If you go out of your way to actually create this path on your system, please take
343
+ # a moment to question your other life choices 🧐
344
+ return "file:/definitely/a/non/exist/int/path/prefix/"
345
+
346
+ # https://github.com/NASA-PDS/pds-deep-archive/issues/102
347
+ def test_sip (self ):
348
+ """Make sure that the SIP generation fails with a URLError due to a non-existent base URL."""
349
+ with self .assertRaises (URLError ):
350
+ super ().test_sip ()
351
+
352
+
328
353
def test_suite ():
329
354
"""Return a suite of tests, duh flake8."""
330
355
return unittest .TestSuite (
331
356
[
332
- unittest .defaultTestLoader .loadTestsFromTestCase (LADEESIPTest ),
333
- unittest .defaultTestLoader .loadTestsFromTestCase (LADEEAIPTest ),
334
- unittest .defaultTestLoader .loadTestsFromTestCase (SensitivitySIPTest ),
335
- unittest .defaultTestLoader .loadTestsFromTestCase (SensitivityAIPTest ),
336
- unittest .defaultTestLoader .loadTestsFromTestCase (InsightAllSIPTest ),
357
+ unittest .defaultTestLoader .loadTestsFromTestCase (DuplicateTabFileTest ),
337
358
unittest .defaultTestLoader .loadTestsFromTestCase (InsightAllAIPTest ),
338
- unittest .defaultTestLoader .loadTestsFromTestCase (InsightLatestSIPTest ),
359
+ unittest .defaultTestLoader .loadTestsFromTestCase (InsightAllSIPTest ),
339
360
unittest .defaultTestLoader .loadTestsFromTestCase (InsightLatestAIPTest ),
340
- unittest .defaultTestLoader .loadTestsFromTestCase (SecondaryCollectionSIPTest ),
361
+ unittest .defaultTestLoader .loadTestsFromTestCase (InsightLatestSIPTest ),
362
+ unittest .defaultTestLoader .loadTestsFromTestCase (LADEEAIPTest ),
363
+ unittest .defaultTestLoader .loadTestsFromTestCase (LADEESIPTest ),
364
+ unittest .defaultTestLoader .loadTestsFromTestCase (NAIF3SIPWithBadbaseurlTest ),
341
365
unittest .defaultTestLoader .loadTestsFromTestCase (SecondaryCollectionAIPTest ),
342
- unittest .defaultTestLoader .loadTestsFromTestCase (LADEESIPWithBadbaseurlTest ),
343
- unittest .defaultTestLoader .loadTestsFromTestCase (DuplicateTabFileTest ),
366
+ unittest .defaultTestLoader .loadTestsFromTestCase (SecondaryCollectionSIPTest ),
367
+ unittest .defaultTestLoader .loadTestsFromTestCase (SensitivityAIPTest ),
368
+ unittest .defaultTestLoader .loadTestsFromTestCase (SensitivitySIPTest ),
344
369
]
345
370
)
0 commit comments