Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
1fc2a0e3
Commit
1fc2a0e3
authored
10 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests and remove debug logging
parent
7b43a503
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/http/server.py
+0
-4
0 additions, 4 deletions
synapse/http/server.py
tests/utils.py
+7
-2
7 additions, 2 deletions
tests/utils.py
with
7 additions
and
6 deletions
synapse/http/server.py
+
0
−
4
View file @
1fc2a0e3
...
@@ -124,14 +124,10 @@ class JsonResource(HttpServer, resource.Resource):
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
tests/utils.py
+
7
−
2
View file @
1fc2a0e3
...
@@ -29,7 +29,7 @@ from twisted.enterprise.adbapi import ConnectionPool
...
@@ -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):
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment