Beispiel #1
0
    def test_print(self, print_report):
        dialog = TillDailyMovementDialog(self.store)

        # Before doing any search, the print button should not be sensitive
        self.assertFalse(dialog.print_button.get_sensitive())

        # After clicking the button, the print dialog should be sensitive
        self.click(dialog.search_button)
        self.assertTrue(dialog.print_button.get_sensitive())

        self.click(dialog.print_button)

        date = dialog.get_daterange()
        print_report.assert_called_once_with(
            TillDailyMovementReport, self.store,
            api.get_current_branch(self.store), date, dialog)
Beispiel #2
0
    def test_print(self, print_report):
        dialog = TillDailyMovementDialog(self.store)

        # Before doing any search, the print button should not be sensitive
        self.assertFalse(dialog.print_button.get_sensitive())

        # After clicking the button, the print dialog should be sensitive
        self.click(dialog.search_button)
        self.assertTrue(dialog.print_button.get_sensitive())

        self.click(dialog.print_button)

        date = dialog.get_daterange()
        print_report.assert_called_once_with(TillDailyMovementReport,
                                             api.get_current_branch(self.store),
                                             date, dialog)