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
f347f0cd
Unverified
Commit
f347f0cd
authored
4 years ago
by
Richard van der Hoff
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove unused FakeResponse (#8864)
parent
30fba621
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
changelog.d/8864.misc
+1
-0
1 addition, 0 deletions
changelog.d/8864.misc
tests/rest/media/v1/test_url_preview.py
+0
-26
0 additions, 26 deletions
tests/rest/media/v1/test_url_preview.py
with
1 addition
and
26 deletions
changelog.d/8864.misc
0 → 100644
+
1
−
0
View file @
f347f0cd
Remove unused `FakeResponse` class from unit tests.
This diff is collapsed.
Click to expand it.
tests/rest/media/v1/test_url_preview.py
+
0
−
26
View file @
f347f0cd
...
...
@@ -18,41 +18,15 @@ import re
from
mock
import
patch
import
attr
from
twisted.internet._resolver
import
HostResolution
from
twisted.internet.address
import
IPv4Address
,
IPv6Address
from
twisted.internet.error
import
DNSLookupError
from
twisted.python.failure
import
Failure
from
twisted.test.proto_helpers
import
AccumulatingProtocol
from
twisted.web._newclient
import
ResponseDone
from
tests
import
unittest
from
tests.server
import
FakeTransport
@attr.s
class
FakeResponse
:
version
=
attr
.
ib
()
code
=
attr
.
ib
()
phrase
=
attr
.
ib
()
headers
=
attr
.
ib
()
body
=
attr
.
ib
()
absoluteURI
=
attr
.
ib
()
@property
def
request
(
self
):
@attr.s
class
FakeTransport
:
absoluteURI
=
self
.
absoluteURI
return
FakeTransport
()
def
deliverBody
(
self
,
protocol
):
protocol
.
dataReceived
(
self
.
body
)
protocol
.
connectionLost
(
Failure
(
ResponseDone
()))
class
URLPreviewTests
(
unittest
.
HomeserverTestCase
):
hijack_auth
=
True
...
...
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