Skip to content

Instantly share code, notes, and snippets.

@sunu
Created May 1, 2013 19:02
Show Gist options
  • Save sunu/5497510 to your computer and use it in GitHub Desktop.
Save sunu/5497510 to your computer and use it in GitHub Desktop.
sunu: /home/sunu/opensource/oppia-django
(oppia-django)⟶ python manage.py test widget
Creating test database for alias 'default'...
...F...
======================================================================
FAIL: test_parameterized_widget (oppia.apps.widget.tests.WidgetUnitTests)
Test that parameterized widgets are correctly handled.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/sunu/opensource/oppia-django/oppia/apps/widget/tests.py", line 141, in test_parameterized_widget
self.assertIn('GLOBALS.noteToGuess = JSON.parse(\'\\"', code)
AssertionError: 'GLOBALS.noteToGuess = JSON.parse(\'\\"' not found in u'<!DOCTYPE HTML>\n<html>\n <head>\n <!--Created by Phil Wagner 2013, feel free to reuse and share.\n Thanks to jQuery and MIDI.js for their libraries. -->\n <style>\n body {\n margin: 0px;\n padding: 0px;\n }\n </style>\n\n <script>\n var GLOBALS = {};\n GLOBALS.noteToGuess = JSON.parse(\'\');\n </script>\n\n <!-- midi.js package -->\n <script src="/data/widgets/MusicStaff/static/js/jquery-1.7.2.min.js"></script>\n <script src="/data/widgets/MusicStaff/static/js/MIDI/AudioDetect.js"></script>\n <script src="/data/widgets/MusicStaff/static/js/MIDI/LoadPlugin.js"></script>\n <script src="/data/widgets/MusicStaff/static/js/MIDI/Plugin.js"></script>\n <script src="/data/widgets/MusicStaff/static/js/MIDI/Player.js"></script>\n <script src="/data/widgets/MusicStaff/static/js/Window/DOMLoader.XMLHttp.js">\n </script>\n <script src="/data/widgets/MusicStaff/static/js/Window/DOMLoader.script.js">\n </script>\n <!-- extras -->\n <script src="/data/widgets/MusicStaff/static/js/WebMIDIAPI.js"></script>\n <script src="/data/widgets/MusicStaff/static/js/Base64.js"></script>\n <script src="/data/widgets/MusicStaff/static/js/base64binary.js"></script>\n </head>\n <body>\n\t<svg\n\t xmlns="http://www.w3.org/2000/svg"\n\t width="600"\n\t height="300"\n\t viewPort="0 0 120 120"\n\t version="1.1">\n\t <line\n\t id="staffLineC4" x1="100" y1="200" x2="500" y2="200"\n\t stroke="white" stroke-width="1" />\n\t <line\n\t id="staffLineD4" x1="100" y1="190" x2="500" y2="190"\n\t stroke="white" stroke-width="1" />\n\t <line\n\t id="staffLineE4" x1="100" y1="180" x2="500" y2="180"\n\t stroke="black" stroke-width="2" />\n\t <line\n\t id="staffLineF4" x1="100" y1="170" x2="500" y2="170"\n\t stroke="white" stroke-width="1" />\n\t <line\n\t id="staffLineG4" x1="100" y1="160" x2="500" y2="160"\n\t stroke="black" stroke-width="2" />\n\t <line\n\t id="staffLineA4" x1="100" y1="150" x2="500" y2="150"\n\t stroke="white" stroke-width="1" />\n\t <line\n\t id="staffLineB4" x1="100" y1="140" x2="500" y2="140"\n\t stroke="black" stroke-width="2" />\n\t <line\n\t id="staffLineC5" x1="100" y1="130" x2="500" y2="130"\n\t stroke="white" stroke-width="1" />\n\t <line\n\t id="staffLineD5" x1="100" y1="120" x2="500" y2="120"\n\t stroke="black" stroke-width="2" />\n\t <line\n\t id="staffLineE5" x1="100" y1="110" x2="500" y2="110"\n\t stroke="white" stroke-width="1" />\n\t <line\n\t id="staffLineF5" x1="100" y1="100" x2="500" y2="100"\n\t stroke="black" stroke-width="2" />\n\t <ellipse \n\t\t id="note01" cx="300" cy="200" rx="14" ry="9"\n\t\t fill="black"/>\n <image\n y="33.508091"\n x="78.376656"\n\t id="treble"\n\t xlink:href="/data/widgets/MusicStaff/static/treble_clef.png"\n\t height="214.07819"\n\t width="172.62373" />\n\t</svg>\n <div style="padding-left: 50px;">\n <span>Current Note: </span>\n <span id="currentNote">C4 261.63</span> Hertz\n\n <br><br>\n\n <button type="button" id="playNote" disabled="true" onClick="playCorrectNote();">\n \tPlay Desired Note\n </button>\n <button type="button" id="playCurrent" disabled="true" onclick="playCurrentNote()">\n \tPlay Current Note\n </button>\n\n <button type="button" onclick="submitAnswer()">\n \tCheck Answer\n </button>\n </div>\n\n <script src="../data/widgets/MusicStaff/static/js/music.js"></script>\n </body>\n</html>'
----------------------------------------------------------------------
Ran 7 tests in 0.237s
FAILED (failures=1)
Destroying test database for alias 'default'...
@sunu
Copy link
Author

sunu commented May 1, 2013

Instead of GLOBALS.noteToGuess = JSON.parse('" I have GLOBALS.noteToGuess = JSON.parse(''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment