def METHOD_NAME(self, pdf_file, assertion):
    # Ensure something has been written
    self.assertNotEqual(pdf_file.tell(), 0)
    # Rewind to the start of the file to read the pdf and get the
    # document's metadata
    pdf_file.seek(0)
    pdf_reader = PdfReader(pdf_file)
    pdf_info = pdf_reader.metadata
    # Check the received metadata matches the expected metadata
    for original_key in METADATA:
        actual_key = "/{}".format(original_key.capitalize())
        actual_value = pdf_info[actual_key]
        expected_value = METADATA[original_key]
        assertion(actual_value, expected_value)