diff --git a/tests/federation/test_federation.py b/tests/federation/test_federation.py
index 1792f9de56..f493ee253e 100644
--- a/tests/federation/test_federation.py
+++ b/tests/federation/test_federation.py
@@ -1,3 +1,17 @@
+# Copyright 2014 matrix.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
# trial imports
from twisted.internet import defer
from twisted.trial import unittest
@@ -82,7 +96,7 @@ class FederationTestCase(unittest.TestCase):
# Empty context initially
(code, response) = yield self.mock_http_server.trigger("GET",
- "/state/my-context/", None)
+ "/matrix/federation/v1/state/my-context/", None)
self.assertEquals(200, code)
self.assertFalse(response["pdus"])
@@ -107,7 +121,7 @@ class FederationTestCase(unittest.TestCase):
)
(code, response) = yield self.mock_http_server.trigger("GET",
- "/state/my-context/", None)
+ "/matrix/federation/v1/state/my-context/", None)
self.assertEquals(200, code)
self.assertEquals(1, len(response["pdus"]))
@@ -118,7 +132,7 @@ class FederationTestCase(unittest.TestCase):
)
(code, response) = yield self.mock_http_server.trigger("GET",
- "/pdu/red/abc123def456/", None)
+ "/matrix/federation/v1/pdu/red/abc123def456/", None)
self.assertEquals(404, code)
# Now insert such a PDU
@@ -137,7 +151,7 @@ class FederationTestCase(unittest.TestCase):
)
(code, response) = yield self.mock_http_server.trigger("GET",
- "/pdu/red/abc123def456/", None)
+ "/matrix/federation/v1/pdu/red/abc123def456/", None)
self.assertEquals(200, code)
self.assertEquals(1, len(response["pdus"]))
self.assertEquals("m.text", response["pdus"][0]["pdu_type"])
@@ -163,7 +177,7 @@ class FederationTestCase(unittest.TestCase):
self.mock_http_client.put_json.assert_called_with(
"remote",
- path="/send/1000000/",
+ path="/matrix/federation/v1/send/1000000/",
data={
"ts": 1000000,
"origin": "test",
@@ -198,7 +212,7 @@ class FederationTestCase(unittest.TestCase):
# MockClock ensures we can guess these timestamps
self.mock_http_client.put_json.assert_called_with(
"remote",
- path="/send/1000000/",
+ path="/matrix/federation/v1/send/1000000/",
data={
"origin": "test",
"ts": 1000000,
@@ -220,7 +234,8 @@ class FederationTestCase(unittest.TestCase):
self.federation.register_edu_handler("m.test", recv_observer)
- yield self.mock_http_server.trigger("PUT", "/send/1001000/",
+ yield self.mock_http_server.trigger("PUT",
+ "/matrix/federation/v1/send/1001000/",
"""{
"origin": "remote",
"ts": 1001000,
diff --git a/tests/federation/test_pdu_codec.py b/tests/federation/test_pdu_codec.py
index 688182fa5b..2c546040b8 100644
--- a/tests/federation/test_pdu_codec.py
+++ b/tests/federation/test_pdu_codec.py
@@ -1,4 +1,18 @@
# -*- coding: utf-8 -*-
+# Copyright 2014 matrix.org
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
from twisted.trial import unittest
from synapse.federation.pdu_codec import (
|