def get_by_class(self, context, quota_class, resource):
        self.called.append(('get_by_class', context, quota_class, resource))
        try:
            return self.by_class[quota_class][resource]
        except __HOLE__:
            raise exception.QuotaClassNotFound(class_name=quota_class)
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/tests/unit/test_quota.py/FakeDriver.get_by_class