def test_make_content_simple_handle_errors(self):
        """Test make_content."""
        file_node = self.vgw.make_file(self.root.id, 'the file name')
        old_hash = file_node.content_hash
        file_id = file_node.id
        new_hash = self.factory.get_fake_hash()
        new_storage_key = uuid.uuid4()
        crc = 12345
        size = 100
        def_size = 10000

        # if we don't provide a storage_key, a content_blob is expected
        self.assertRaises(errors.ContentMissing, self.vgw.make_content,
                          file_id, old_hash, new_hash,
                          crc, size, def_size, None)

        # the content hash must match
        self.assertRaises(errors.HashMismatch, self.vgw.make_content,
                          file_id, 'YYYY', new_hash, crc, size, def_size, None)

        # after the upload job was created/started, the users quota was reduced
        self.tweak_users_quota(self.owner, size - 1)
        self.assertRaises(errors.QuotaExceeded, self.vgw.make_content,
                          file_id, old_hash, new_hash,
                          crc, size, def_size, new_storage_key)