def test_inprogress_after_updates(self):
        app_state = AppState()
        app_state.update_progress(result=Result([''], ['afef']))
        self.assertTrue(app_state.inprogress)
        app_state.save()

        app_state = AppState()
        self.assertTrue(app_state.inprogress)
    def test_inprogress_after_finishing(self):
        app_state = AppState()
        app_state.update_progress(result=Result([''], ['afef']))
        app_state.mark_finished()

        self.assertTrue(app_state.inprogress)
        app_state.save()

        app_state = AppState()
        self.assertTrue(app_state.inprogress)
    def test_inprogress_after_configuring(self):
        app_state = AppState()
        app_state.update_progress(result=Result([''], ['afef']))
        app_state.mark_finished()

        new_conf = DownloadConfiguration(number_of_images=0,
                                         images_per_category=83,
                                         download_destination='481516')

        app_state.set_configuration(new_conf)
        self.assertFalse(app_state.inprogress)