コード例 #1
0
ファイル: tests.py プロジェクト: sunu/oppia-test-2
    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)
コード例 #2
0
ファイル: admin.py プロジェクト: sunu/oppia-test-2
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()
コード例 #3
0
ファイル: admin.py プロジェクト: paulproteus/oppia-test-3
def reload_explorations():
    """Reload the default explorations."""
    Exploration.delete_demo_explorations()
    Exploration.load_demo_explorations()