Exemplo n.º 1
0
 def testFalcon9StringRepresentation(self):
     f9 = models.Falcon9()
     s = ("Falcon9 Rocket\n"
          "\tFirstStage: consisting of 9 Merlin engines\n"
          "\tInterStage: composite structure connecting stages 1 and 2\n"
          "\tSecondStage: consisting of 1 Merlin engine\n"
          "\tPayload: DragonSpacecraft")
     self.assertEqual(str(f9), s)
Exemplo n.º 2
0
    def testFalcon9DetatchFirstStage(self):
        f9 = models.Falcon9()
        self.assertIsInstance(f9.firstStage, models.FirstStage)
        self.assertIsInstance(f9.secondStage, models.SecondStage)
        self.assertIsInstance(f9.interstage, models.InterStage)
        self.assertIsInstance(f9.payload, models.DragonSpacecraft)

        f9.detatchFirstStage()
        self.assertIsNone(f9.firstStage)
        self.assertIsNone(f9.interstage)
Exemplo n.º 3
0
 def testFlight(self):
     try:
         f9 = models.Falcon9()
         flight = models.Flight(f9)
         flight.countDown(0)
         flight.launch()
         firstStage = flight.detatchFirstStage()
         flight.recoverStage(firstStage)
         flight.jetisonPayload()
     except models.CatastrophicFailure:
         self.fail("Flight test raised a CatastrophicFailure")
Exemplo n.º 4
0
 def testFalcon9Initialization(self):
     f9 = models.Falcon9()
     self.assertIsInstance(f9, models.Falcon9)
Exemplo n.º 5
0
 def testFlightInitialization(self):
     f9 = models.Falcon9()
     flight = models.Flight(f9)
     self.assertIsInstance(flight, models.Flight)