diff options
Diffstat (limited to 'repoze/bfg/tests/grokkedapp/another.py')
| -rw-r--r-- | repoze/bfg/tests/grokkedapp/another.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/repoze/bfg/tests/grokkedapp/another.py b/repoze/bfg/tests/grokkedapp/another.py new file mode 100644 index 000000000..b97110ab0 --- /dev/null +++ b/repoze/bfg/tests/grokkedapp/another.py @@ -0,0 +1,39 @@ +from repoze.bfg.view import bfg_view + +@bfg_view(name='another') +def grokked(context, request): + return 'another_grokked' + +@bfg_view(request_method='POST', name='another') +def grokked_post(context, request): + return 'another_grokked_post' + +class oldstyle_grokked_class: + def __init__(self, context, request): + self.context = context + self.request = request + + def __call__(self): + return 'another_oldstyle_grokked_class' + +oldstyle_grokked_class = bfg_view(name='another_oldstyle_grokked_class')( + oldstyle_grokked_class) + +class grokked_class(object): + def __init__(self, context, request): + self.context = context + self.request = request + + def __call__(self): + return 'another_grokked_class' + +grokked_class = bfg_view(name='another_grokked_class')(grokked_class) + +# ungrokkable + +A = 1 +B = {} + +def stuff(): + """ """ + |
