'Test that deleting a missing field from an existing StudentModule raises a KeyError'

def test_delete_missing_field(self):

    with self.assertNumQueries(0):
        self.assertRaises(KeyError, self.kvs.delete, user_state_key('not_a_field'))
    self.assertEquals(1, StudentModule.objects.all().count())
    self.assertEquals({'b_field': 'b_value', 'a_field': 'a_value'}, json.loads(StudentModule.objects.all()[0].state))
