def test_get_predictions(self): with HTTMock(nextbus_predictions_mock): nb = NextBus() predictions = nb.get_predictions("ttc", "512", "14295") self.assertEqual(int(predictions[0]["seconds"]), 8) # Fake dataset, fixed value