#NEWLINE# def assert_rpm_headers( test_case , expected_headers , rpm_path ) : #NEWLINE# #INDENT# '\n    Fail unless the ``RPM`` file at ``rpm_path`` contains all the\n    ``expected_headers``.\n\n    :param test_case: The ``TestCase`` whose assert methods will be called.\n    :param dict expected_headers: A dictionary of header key / value pairs.\n    :param FilePath rpm_path: The path to the RPM file under test.\n    ' #NEWLINE# output = check_output ( [ 'rpm' , '--query' , '--info' , '--package' , rpm_path . path ] ) #NEWLINE# actual_headers = parse_colon_dict ( output ) #NEWLINE# assert_dict_contains ( test_case , expected_headers , actual_headers , 'Missing RPM Headers: ' )