Show More
@@ -534,9 +534,13 b' def add_events_routes(config):' | |||||
534 | pattern='/{repo_name}/files/{commit_id}/{f_path}') |
|
534 | pattern='/{repo_name}/files/{commit_id}/{f_path}') | |
535 |
|
535 | |||
536 |
|
536 | |||
537 | def bootstrap_request(): |
|
537 | def bootstrap_request(**kwargs): | |
538 | import pyramid.testing |
|
538 | import pyramid.testing | |
539 | request = pyramid.testing.DummyRequest() |
|
539 | request = pyramid.testing.DummyRequest(**kwargs) | |
|
540 | request.application_url = kwargs.pop('application_url', 'http://example.com') | |||
|
541 | request.host = kwargs.pop('host', 'example.com:80') | |||
|
542 | request.domain = kwargs.pop('domain', 'example.com') | |||
|
543 | ||||
540 | config = pyramid.testing.setUp(request=request) |
|
544 | config = pyramid.testing.setUp(request=request) | |
541 | add_events_routes(config) |
|
545 | add_events_routes(config) | |
542 |
|
546 |
@@ -213,7 +213,8 b' class Hooks(object):' | |||||
213 | extras = AttributeDict(extras) |
|
213 | extras = AttributeDict(extras) | |
214 | pylons_router = get_routes_generator_for_server_url(extras.server_url) |
|
214 | pylons_router = get_routes_generator_for_server_url(extras.server_url) | |
215 | pylons.url._push_object(pylons_router) |
|
215 | pylons.url._push_object(pylons_router) | |
216 |
extras.request = bootstrap_request( |
|
216 | extras.request = bootstrap_request( | |
|
217 | application_url=extras['server_url']) | |||
217 |
|
218 | |||
218 | try: |
|
219 | try: | |
219 | result = hook(extras) |
|
220 | result = hook(extras) |
General Comments 0
You need to be logged in to leave comments.
Login now