Пример #1
0
 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)
Пример #2
0
 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:")
Пример #3
0
 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")
Пример #4
0
 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")
Пример #5
0
 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")
Пример #6
0
 def test_cycles(self):
     sys.argv.append("cycles")
     args = apsbss.get_options()
     self.assertIsNotNone(args)
     self.assertEqual(args.subcommand, "cycles")
Пример #7
0
 def test_no_options(self):
     args = apsbss.get_options()
     self.assertIsNotNone(args)
     self.assertIsNone(args.subcommand)