Coverage for modules/org/openteacher/logic/savers/test/test : 93%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
#! /usr/bin/env python3 # -*- coding: utf-8 -*-
# Copyright 2012-2014, Marten de Vries # # This file is part of OpenTeacher. # # OpenTeacher is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # OpenTeacher is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with OpenTeacher. If not, see <http://www.gnu.org/licenses/>.
self.skipTest("This tests isn't run in this mode.")
#save lesson
#file should exist after saving. #and it should not be empty.
#html saver
except AssertionError: print("%s modified the lesson object passed to save(), which isn't allowed. More info:" % saver) raise
"items": [ { "remote": True, "name": "http://openteacher.org/", "question": "a", "filename": "http://openteacher.org/", "answer": "b", "id": 0 }, { "remote": False, "name": "openteacher-icon.png", "question": "", "filename": metadata["iconPath"], "answer": "", "id": 1 } ], "tests": [] }, {})) #FIXME: see comment on resources in the .otmd saver file.
"items": [ { "y": 364, "x": 399, "id": 0, "name": "Test", }, ], "tests": [ { "finished": True, "results": [ { "itemId": 0, "active": { "start": datetime.datetime.now(), "end": datetime.datetime.now(), }, "result": "wrong", } ], "pauses": [ ], }, { "finished": True, "results": [ { "itemId": 0, "active": { "start": datetime.datetime.now(), "end": datetime.datetime.now(), }, "result": "right", } ], "pauses": [ ], }, ], }, { "mapPath": metadata["iconPath"], "mapScreenshot": metadata["iconPath"], }))
"title": u"My títle", "questionLanguage": u"Varyíng", "answerLanguage": u"Va®ying too. Some úñí©óðé.", "items": [ { "id": 0, "questions": [(u"eén",), (u"uno", u"un",)], "answers": [(u"twée", u"deux"), ("two", "zwei")], "created": datetime.datetime.now(), }, { "id": 1, "questions": [(u"drie",)], "answers": [(u"three",)], } ], "tests":[ { "finished": True, "results": [ { "itemId":0, "active": { "start": datetime.datetime.now(), "end": datetime.datetime.now(), }, "result": "right", "givenAnswer": "one", }, { "itemId": 1, "active": { "start": datetime.datetime.now(), "end": datetime.datetime.now(), }, "result": "wrong", "givenAnswer": "ttwo", }, ], "pauses": [ ], }, ], }))
set(self._mm.mods(type="save")), set(self._mm.mods("active", type="save")) )
self._mm.mods(type="save"), #re-using the icon as test topo map to save a bit of space. self._mm.mods(type="metadata"), )
|