def test_esaf(self): sys.argv.append("esaf") sys.argv.append("12345") args = apsbss.get_options() self.assertIsNotNone(args) self.assertEqual(args.subcommand, "esaf") self.assertEqual(args.esafId, 12345)
def test_EPICS_update(self): sys.argv.append("update") sys.argv.append("bss:") args = apsbss.get_options() self.assertIsNotNone(args) self.assertEqual(args.subcommand, "update") self.assertEqual(args.prefix, "bss:")
def test_current(self): sys.argv.append("current") sys.argv.append("9-ID-B,C") args = apsbss.get_options() self.assertIsNotNone(args) self.assertEqual(args.subcommand, "current") self.assertEqual(args.beamlineName, "9-ID-B,C")
def test_EPICS_setup(self): sys.argv.append("setup") sys.argv.append("bss:") sys.argv.append("my_beamline") sys.argv.append("1995-1") args = apsbss.get_options() self.assertIsNotNone(args) self.assertEqual(args.subcommand, "setup") self.assertEqual(args.prefix, "bss:") self.assertEqual(args.beamlineName, "my_beamline") self.assertEqual(args.cycle, "1995-1")
def test_proposal(self): sys.argv.append("proposal") sys.argv.append("proposal_number_here") sys.argv.append("1995-1") sys.argv.append("my_beamline") args = apsbss.get_options() self.assertIsNotNone(args) self.assertEqual(args.subcommand, "proposal") self.assertEqual(args.proposalId, "proposal_number_here") self.assertEqual(args.cycle, "1995-1") self.assertEqual(args.beamlineName, "my_beamline")
def test_cycles(self): sys.argv.append("cycles") args = apsbss.get_options() self.assertIsNotNone(args) self.assertEqual(args.subcommand, "cycles")
def test_no_options(self): args = apsbss.get_options() self.assertIsNotNone(args) self.assertIsNone(args.subcommand)