def test_edit_two(self): q = Quiz() q.edit(dict(description='foo'), None) self.assertEqual(q.description, 'foo') self.assertFalse(q.rhetorical) self.assertFalse(q.allow_redo) self.assertFalse(q.show_submit_state)
def test_edit(self): q = Quiz() q.edit(dict(description='foo', rhetorical='on', allow_redo='0', show_submit_state='on'), None) self.assertEqual(q.description, 'foo') self.assertEqual(q.rhetorical, True) self.assertEqual(q.allow_redo, False) self.assertTrue(q.show_submit_state)