'Walk through a few toggles. Make sure the blocks don\'t mix up
state between them, initial state is correct, and final state
is correct.'

def test_done(self):

    self.check_response('done_0', 'done-unmarked')
    self.check_response('done_1', 'done-unmarked')
    self.toggle_button('done_0', {}, False)
    self.reset_published_events()
    self.toggle_button('done_1', {}, False)
    self.assert_no_events_published('edx.done.toggled')
    self.reset_published_events()
    self.toggle_button('done_0', {'done': True}, True)
    self.assert_event_published('edx.done.toggled', event_fields={'done': True})
    self.reset_published_events()
    self.toggle_button('done_1', {'done': False}, False)
    self.assert_event_published('edx.done.toggled', event_fields={'done': False})
    self.toggle_button('done_0', {'done': False}, False)
    self.assert_grade(0)
    self.toggle_button('done_1', {'done': True}, True)
    self.assert_grade(1)
    self.toggle_button('done_0', {}, False)
    self.toggle_button('done_1', {}, True)
    self.check_response('done_0', 'done-unmarked')
    self.check_response('done_1', 'done-marked')
