3
0
Fork 0

feat: add basic Delete support for CRUD master view

This commit is contained in:
Lance Edgar 2024-08-11 09:56:47 -05:00
parent 1a8fc8dd44
commit c46b42f76d
12 changed files with 331 additions and 72 deletions

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8; -*-
from unittest import TestCase
from unittest.mock import patch
from pyramid import testing
@ -151,6 +152,14 @@ class TestGridAction(TestCase):
label = action.render_label()
self.assertEqual(label, "Bar")
def test_render_icon_and_label(self):
action = self.make_action('blarg')
with patch.multiple(action,
render_icon=lambda: 'ICON',
render_label=lambda: 'LABEL'):
html = action.render_icon_and_label()
self.assertEqual('ICON LABEL', html)
def test_get_url(self):
obj = {'foo': 'bar'}