##// END OF EJS Templates
tests: add require methods to testing request....
marcink -
r2317:830b678e default
parent child Browse files
Show More
@@ -618,12 +618,14 b' def add_events_routes(config):'
618 def bootstrap_config(request):
618 def bootstrap_config(request):
619 import pyramid.testing
619 import pyramid.testing
620 registry = pyramid.testing.Registry('RcTestRegistry')
620 registry = pyramid.testing.Registry('RcTestRegistry')
621
621 config = pyramid.testing.setUp(registry=registry, request=request)
622 config = pyramid.testing.setUp(registry=registry, request=request)
622
623
623 # allow pyramid lookup in testing
624 # allow pyramid lookup in testing
624 config.include('pyramid_mako')
625 config.include('pyramid_mako')
625
626
626 add_events_routes(config)
627 add_events_routes(config)
628
627 return config
629 return config
628
630
629
631
@@ -638,6 +640,19 b' def bootstrap_request(**kwargs):'
638 def translate(self, msg):
640 def translate(self, msg):
639 return msg
641 return msg
640
642
643 def plularize(self, singular, plural, n):
644 return singular
645
646 def get_partial_renderer(self, tmpl_name):
647
648 from rhodecode.lib.partial_renderer import get_partial_renderer
649 return get_partial_renderer(request=self, tmpl_name=tmpl_name)
650
651 _call_context = {}
652 @property
653 def call_context(self):
654 return self._call_context
655
641 class TestDummySession(pyramid.testing.DummySession):
656 class TestDummySession(pyramid.testing.DummySession):
642 def save(*arg, **kw):
657 def save(*arg, **kw):
643 pass
658 pass
General Comments 0
You need to be logged in to leave comments. Login now