コード例 #1
0
 def test_has_add_permission(self):
     TethysAppSettingInline.model = mock.MagicMock()
     ret = TethysAppSettingInline(mock.MagicMock(), mock.MagicMock())
     self.assertFalse(ret.has_add_permission(mock.MagicMock()))
コード例 #2
0
 def test_TethysAppSettingInline(self):
     expected_template = 'tethys_portal/admin/edit_inline/tabular.html'
     TethysAppSettingInline.model = mock.MagicMock()
     ret = TethysAppSettingInline(mock.MagicMock(), mock.MagicMock())
     self.assertEquals(expected_template, ret.template)