def test__dialog_call(self, new_store, run_dialog): new_store.return_value = self.store call = self.create_call() web_view = WebView() web_view.app = None with mock.patch.object(self.store, 'commit'): with mock.patch.object(self.store, 'close'): web_view._dialog_purchase(id=call.id)
def test_dialog_purchase(self, new_store, run_dialog): new_store.return_value = self.store purchase = self.create_purchase_order() web_view = WebView() web_view.app = None with mock.patch.object(self.store, 'commit'): with mock.patch.object(self.store, 'close'): web_view._dialog_purchase(id=purchase.id) run_dialog.assert_called_once_with( PurchaseDetailsDialog, None, self.store, purchase)