'Test that deleting an existing field removes it from the StudentModule'

def test_delete_existing_field(self):

    with self.assertNumQueries(2, using='default'):
        with self.assertNumQueries(1, using='student_module_history'):
            self.kvs.delete(user_state_key('a_field'))
    self.assertEquals(1, StudentModule.objects.all().count())
    self.assertRaises(KeyError, self.kvs.get, user_state_key('not_a_field'))
