def test_make_file_with_content_enforces_quota(self):
        """Make file with contentblob enforces quota check (or not)."""
        name = 'filename'
        hash = self.factory.get_fake_hash()
        storage_key = uuid.uuid4()
        crc = 12345
        size = deflated_size = 10000
        f = self.vgw.make_file_with_content
        self.assertRaises(errors.QuotaExceeded, f, self.root.id, name, hash,
                          crc, size, deflated_size, storage_key,
                          enforce_quota=True)
        node = f(self.root.id, name, hash, crc, size, deflated_size,
                 storage_key, mimetype='image/tif', enforce_quota=False)
        self.assertTrue(node is not None)