'Check if the passed header has the given filename.'

def check_filename(self, header, filename, expected_inline=False):

    reply = self.stubs.FakeNetworkReply(headers={'Content-Disposition': header})
    (cd_inline, cd_filename) = http.parse_content_disposition(reply)
    assert (cd_filename is not None)
    assert (cd_filename == filename)
    assert (cd_inline == expected_inline)
