feat: add basic Delete support for CRUD master view
This commit is contained in:
parent
1a8fc8dd44
commit
c46b42f76d
12 changed files with 331 additions and 72 deletions
|
@ -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'}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue