コード例 #1
0
    def test_read_tle(self):
        db = sources.EtcTLESource(self.filename)

        tle = db._get_tle(SATE_ID, datetime.datetime.now())
        self.assertEqual(tle, SAMPLE_TLE)
コード例 #2
0
    def test_wrong_sate(self):
        db = sources.EtcTLESource(self.filename)

        with self.assertRaises(LookupError):
            db._get_tle("fake_id", datetime.datetime.now())
コード例 #3
0
    def test_add_tle(self):
        db = sources.EtcTLESource(self.filename)

        db.add_tle(SATE_ID, SAMPLE_TLE2, dt.datetime.utcnow())
        tle = db._get_tle(SATE_ID, dt.datetime.utcnow())
        self.assertEqual(tle, SAMPLE_TLE2)