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
0897a09f
Commit
0897a09f
authored
10 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Fix unit tests after adding extra argument on put_json
parent
6ac0b4ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/federation/test_federation.py
+6
-3
6 additions, 3 deletions
tests/federation/test_federation.py
tests/handlers/test_presence.py
+18
-5
18 additions, 5 deletions
tests/handlers/test_presence.py
tests/handlers/test_typing.py
+4
-2
4 additions, 2 deletions
tests/handlers/test_typing.py
with
28 additions
and
10 deletions
tests/federation/test_federation.py
+
6
−
3
View file @
0897a09f
...
...
@@ -17,7 +17,7 @@ from twisted.internet import defer
from
tests
import
unittest
# python imports
from
mock
import
Mock
from
mock
import
Mock
,
ANY
from
..utils
import
MockHttpResource
,
MockClock
...
...
@@ -181,7 +181,8 @@ class FederationTestCase(unittest.TestCase):
"
depth
"
:
1
,
},
]
}
},
on_send_callback
=
ANY
,
)
@defer.inlineCallbacks
...
...
@@ -212,7 +213,9 @@ class FederationTestCase(unittest.TestCase):
"
content
"
:
{
"
testing
"
:
"
content here
"
},
}
],
})
},
on_send_callback
=
ANY
,
)
@defer.inlineCallbacks
def
test_recv_edu
(
self
):
...
...
This diff is collapsed.
Click to expand it.
tests/handlers/test_presence.py
+
18
−
5
View file @
0897a09f
...
...
@@ -319,7 +319,8 @@ class PresenceInvitesTestCase(unittest.TestCase):
"
observer_user
"
:
"
@apple:test
"
,
"
observed_user
"
:
"
@cabbage:elsewhere
"
,
}
)
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -345,7 +346,8 @@ class PresenceInvitesTestCase(unittest.TestCase):
"
observer_user
"
:
"
@cabbage:elsewhere
"
,
"
observed_user
"
:
"
@apple:test
"
,
}
)
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -376,7 +378,8 @@ class PresenceInvitesTestCase(unittest.TestCase):
"
observer_user
"
:
"
@cabbage:elsewhere
"
,
"
observed_user
"
:
"
@durian:test
"
,
}
)
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -765,7 +768,8 @@ class PresencePushTestCase(unittest.TestCase):
"
last_active_ago
"
:
0
},
],
}
)
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -780,7 +784,8 @@ class PresencePushTestCase(unittest.TestCase):
"
last_active_ago
"
:
0
},
],
}
)
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -906,6 +911,7 @@ class PresencePushTestCase(unittest.TestCase):
],
}
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -920,6 +926,7 @@ class PresencePushTestCase(unittest.TestCase):
],
}
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -949,6 +956,7 @@ class PresencePushTestCase(unittest.TestCase):
],
}
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -1145,6 +1153,7 @@ class PresencePollingTestCase(unittest.TestCase):
"
poll
"
:
[
"
@potato:remote
"
],
},
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -1157,6 +1166,7 @@ class PresencePollingTestCase(unittest.TestCase):
"
push
"
:
[
{
"
user_id
"
:
"
@clementine:test
"
}],
},
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -1185,6 +1195,7 @@ class PresencePollingTestCase(unittest.TestCase):
"
push
"
:
[
{
"
user_id
"
:
"
@fig:test
"
}],
},
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -1217,6 +1228,7 @@ class PresencePollingTestCase(unittest.TestCase):
"
unpoll
"
:
[
"
@potato:remote
"
],
},
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -1248,6 +1260,7 @@ class PresencePollingTestCase(unittest.TestCase):
],
},
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
This diff is collapsed.
Click to expand it.
tests/handlers/test_typing.py
+
4
−
2
View file @
0897a09f
...
...
@@ -169,7 +169,8 @@ class TypingNotificationsTestCase(unittest.TestCase):
"
user_id
"
:
self
.
u_apple
.
to_string
(),
"
typing
"
:
True
,
}
)
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
@@ -219,7 +220,8 @@ class TypingNotificationsTestCase(unittest.TestCase):
"
user_id
"
:
self
.
u_apple
.
to_string
(),
"
typing
"
:
False
,
}
)
),
on_send_callback
=
ANY
,
),
defer
.
succeed
((
200
,
"
OK
"
))
)
...
...
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