def test_loading_and_deletion_of_demo_explorations(self): """Test loading and deletion of the demo explorations.""" self.assertEqual(Exploration.query().count(), 0) Exploration.load_demo_explorations() self.assertEqual(Exploration.query().count(), 6) Exploration.delete_demo_explorations() self.assertEqual(Exploration.query().count(), 0)
def reload_demos(): """Reload default classifiers, widgets, and explorations (in that order).""" Classifier.delete_all_classifiers() Classifier.load_default_classifiers() Widget.delete_all_widgets() InteractiveWidget.load_default_widgets() NonInteractiveWidget.load_default_widgets() Exploration.delete_demo_explorations() Exploration.load_demo_explorations()
def reload_explorations(): """Reload the default explorations.""" Exploration.delete_demo_explorations() Exploration.load_demo_explorations()