def test_method_close_flyout_set_is_closing(self):
        race_data = MagicMock(spec='replayenhancer.RaceData.RaceData',
                              autospec=True)
        driver = MagicMock(spec='replayenhancer.RaceData.Driver',
                           autospec=True)
        font = MagicMock(spec='PIL.ImageFont', autospec=True)
        size = (100, 100)
        location = (100, 1, 100)

        instance = PitStopFlyout(race_data, driver, font, size, location)
        instance.close_flyout()
        self.assertTrue(instance.is_closing)
    def test_method_close_flyout(self):
        race_data = MagicMock(spec='replayenhancer.RaceData.RaceData',
                              autospec=True)
        driver = MagicMock(spec='replayenhancer.RaceData.Driver',
                           autospec=True)
        font = MagicMock(spec='PIL.ImageFont', autospec=True)
        size = (100, 100)
        location = (100, 1, 100)

        instance = PitStopFlyout(race_data, driver, font, size, location)
        instance.close_flyout()
        expected_result = Animation
        self.assertIsInstance(instance.animations[-1], expected_result)