'Verify uses of clobber and overwrite.'

def test_file_output_overwrite_vs_clobber(self):

    outpath = self.temp('diff_output.txt')
    ha = Header([('A', 1), ('B', 2), ('C', 3)])
    hb = ha.copy()
    hb['C'] = 4
    diffobj = HeaderDiff(ha, hb)
    diffobj.report(fileobj=outpath)
    report_as_string = diffobj.report()
    with catch_warnings(AstropyDeprecationWarning) as warning_lines:
        diffobj.report(fileobj=outpath, clobber=True)
        assert (warning_lines[0].category == AstropyDeprecationWarning)
        assert (str(warning_lines[0].message) == '"clobber"    was    deprecated    in    version    2.0    and    will    be    removed    in    a    future    version.    Use    argument    "overwrite"    instead.')
