'Test that setting an existing user_state field changes the value'

def test_set_existing_field(self):

    with self.assertNumQueries(4, using='default'):
        with self.assertNumQueries(1, using='student_module_history'):
            self.kvs.set(user_state_key('a_field'), 'new_value')
    self.assertEquals(1, StudentModule.objects.all().count())
    self.assertEquals({'b_field': 'b_value', 'a_field': 'new_value'}, json.loads(StudentModule.objects.all()[0].state))
