• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / grokcore.view / 16248935885

18 Jun 2025 06:52AM UTC coverage: 93.234%. Remained the same
16248935885

push

github

icemac
Back to development: 5.1

151 of 180 branches covered (83.89%)

Branch coverage included in aggregate %.

1475 of 1564 relevant lines covered (94.31%)

0.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.89
/src/grokcore/view/tests/base/view/view_decorator.py
1
"""
2
Using the @grok.require decorator in a view class is not allowed.
3

4
  >>> grok.testing.grok(__name__)
5
  Traceback (most recent call last):
6
    ...
7
  martian.error.GrokError: The @grok.require decorator is used for\
8
  method 'render' in view\
9
  <class 'grokcore.view.tests.base.view.view_decorator.BogusView'>.\
10
  It may only be used for XML-RPC methods.
11

12

13
"""
14

15
import zope.interface
1✔
16

17
import grokcore.view as grok
1✔
18

19

20
class Bogus(grok.Permission):
1✔
21
    grok.name('bogus.perm')
1✔
22

23

24
class BogusView(grok.View):
1✔
25
    grok.context(zope.interface.Interface)
1✔
26

27
    @grok.require(Bogus)
1✔
28
    def render(self):
1✔
29
        pass
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc