Example #1
0
 def testBadKeyIngest(self):
     """Verify that a command line with unsupported arguments is rejected.
     """
     args = '--dataset %s --output tests/output/foo --id "visit=54123"' \
         % CommandLineTestSuite.datasetKey
     with self.assertRaises(SystemExit):
         self._parseString(args, ap_verify._IngestOnlyParser())
Example #2
0
 def testMinimumIngest(self):
     """Verify that a command line consisting only of required arguments parses correctly.
     """
     args = '--dataset %s --output tests/output/foo' % CommandLineTestSuite.testDataset
     parsed = self._parseString(args, ap_verify._IngestOnlyParser())
     self.assertEqual(parsed.dataset.datasetRoot,
                      lsst.utils.getPackageDir(CommandLineTestSuite.testDataset))
     self.assertEqual(parsed.output, "tests/output/foo")
Example #3
0
 def testMissingIngest(self):
     """Verify that a command line consisting missing required arguments is rejected.
     """
     args = '--dataset %s' % CommandLineTestSuite.datasetKey
     with self.assertRaises(SystemExit):
         self._parseString(args, ap_verify._IngestOnlyParser())