def test_update_all_apps(self, update_app_patch): """ Verifies that update_app is called with all installed apps """ initial_data_manager = InitialDataUpdater() initial_data_manager.update_all_apps() self.assertEqual(2, update_app_patch.call_count)
def test_update_all_apps(self, update_app_patch): """ Verifies that update_app is called with all installed apps """ initial_data_manager = InitialDataUpdater() initial_data_manager.update_all_apps() self.assertEqual(2, update_app_patch.call_count)
def test_update_all_apps(self): """ Verifies that update_app is called with all installed apps """ num_apps = len(settings.INSTALLED_APPS) with patch('dynamic_initial_data.base.InitialDataUpdater.update_app', spec_set=True) as update_app_patch: initial_data_manager = InitialDataUpdater() initial_data_manager.update_all_apps() self.assertEqual(num_apps, update_app_patch.call_count)
def test_update_all_apps(self): """ Verifies that update_app is called with all installed apps """ num_apps = len(settings.INSTALLED_APPS) with patch('dynamic_initial_data.base.InitialDataUpdater.update_app', spec_set=True) as update_app_patch: initial_data_manager = InitialDataUpdater() initial_data_manager.update_all_apps() self.assertEqual(num_apps, update_app_patch.call_count)
def handle(self, *args, **options): updater = InitialDataUpdater(options) if options['app']: updater.update_app(options['app']) else: updater.update_all_apps()
def handle(self, *args, **options): updater = InitialDataUpdater(options) if options['app']: updater.update_app(options['app']) else: updater.update_all_apps()
def handle(self, *args, **options): manager = InitialDataUpdater(options) manager.update_all_apps()