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())
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")
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())