mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 22:09:24 -05:00
Fix tests and remove debug logging
This commit is contained in:
parent
7b43a503f3
commit
1fc2a0e33e
@ -124,14 +124,10 @@ class JsonResource(HttpServer, resource.Resource):
|
|||||||
# returned response. We pass both the request and any
|
# returned response. We pass both the request and any
|
||||||
# matched groups from the regex to the callback.
|
# matched groups from the regex to the callback.
|
||||||
|
|
||||||
logger.debug("url things: %r", m.groups())
|
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
urllib.unquote(u).decode("UTF-8") for u in m.groups()
|
urllib.unquote(u).decode("UTF-8") for u in m.groups()
|
||||||
]
|
]
|
||||||
|
|
||||||
logger.debug("url things args: %r", args)
|
|
||||||
|
|
||||||
code, response = yield path_entry.callback(
|
code, response = yield path_entry.callback(
|
||||||
request,
|
request,
|
||||||
*args
|
*args
|
||||||
|
@ -29,7 +29,7 @@ from twisted.enterprise.adbapi import ConnectionPool
|
|||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from mock import patch, Mock
|
from mock import patch, Mock
|
||||||
import json
|
import urllib
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
from inspect import getcallargs
|
from inspect import getcallargs
|
||||||
@ -103,9 +103,14 @@ class MockHttpResource(HttpServer):
|
|||||||
matcher = pattern.match(path)
|
matcher = pattern.match(path)
|
||||||
if matcher:
|
if matcher:
|
||||||
try:
|
try:
|
||||||
|
args = [
|
||||||
|
urllib.unquote(u).decode("UTF-8")
|
||||||
|
for u in matcher.groups()
|
||||||
|
]
|
||||||
|
|
||||||
(code, response) = yield func(
|
(code, response) = yield func(
|
||||||
mock_request,
|
mock_request,
|
||||||
*matcher.groups()
|
*args
|
||||||
)
|
)
|
||||||
defer.returnValue((code, response))
|
defer.returnValue((code, response))
|
||||||
except CodeMessageException as e:
|
except CodeMessageException as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user