def METHOD_NAME(self):
    """Test buttons whose commands use printer function."""
    dialog = self.dialog
    button_sources = [(dialog.py_license, license, 'license'),
                      (dialog.py_copyright, copyright, 'copyright'),
                      (dialog.py_credits, credits, 'credits')]
    for button, printer, name in button_sources:
        with self.subTest(name=name):
            printer._Printer__setup()
            button.invoke()
            get = dialog._current_textview.viewframe.textframe.text.get
            lines = printer._Printer__lines
            if len(lines) < 2:
                self.fail(name + ' full text was not found')
            self.assertEqual(lines[0], get('1.0', '1.end'))
            self.assertEqual(lines[1], get('2.0', '2.end'))
            dialog._current_textview.destroy()