mirror of https://github.com/zulip/zulip.git
archives: Change the topic/<topic_name> code path to use topics prefix.
We do this for maintaining consistency in naming of the endpoints.
This commit is contained in:
parent
bf1ad714da
commit
2e837b1407
|
@ -10,13 +10,13 @@ class GlobalPublicStreamTest(ZulipTestCase):
|
|||
def test_non_existant_stream_id(self) -> None:
|
||||
# Here we use a relatively big number as stream id assumming such an id
|
||||
# won't exist in the test DB.
|
||||
result = self.client_get("/archive/streams/100000000/topic/TopicGlobal")
|
||||
result = self.client_get("/archive/streams/100000000/topics/TopicGlobal")
|
||||
self.assert_in_success_response(["This stream does not exist."], result)
|
||||
|
||||
def test_non_web_public_stream(self) -> None:
|
||||
test_stream = self.make_stream('Test Public Archives')
|
||||
result = self.client_get(
|
||||
"/archive/streams/" + str(test_stream.id) + "/topic/notpublicglobalstream"
|
||||
"/archive/streams/" + str(test_stream.id) + "/topics/notpublicglobalstream"
|
||||
)
|
||||
self.assert_in_success_response(["This stream does not exist."], result)
|
||||
|
||||
|
@ -24,7 +24,7 @@ class GlobalPublicStreamTest(ZulipTestCase):
|
|||
test_stream = self.make_stream('Test Public Archives')
|
||||
do_change_stream_web_public(test_stream, True)
|
||||
result = self.client_get(
|
||||
"/archive/streams/" + str(test_stream.id) + "/topic/nonexistenttopic"
|
||||
"/archive/streams/" + str(test_stream.id) + "/topics/nonexistenttopic"
|
||||
)
|
||||
self.assert_in_success_response(["This topic does not exist."], result)
|
||||
|
||||
|
@ -40,7 +40,7 @@ class GlobalPublicStreamTest(ZulipTestCase):
|
|||
'TopicGlobal'
|
||||
)
|
||||
return self.client_get(
|
||||
"/archive/streams/" + str(test_stream.id) + "/topic/TopicGlobal"
|
||||
"/archive/streams/" + str(test_stream.id) + "/topics/TopicGlobal"
|
||||
)
|
||||
|
||||
result = send_msg_and_get_result('Test Message 1')
|
||||
|
|
|
@ -457,7 +457,7 @@ i18n_urls = [
|
|||
zerver.views.registration.create_realm, name='zerver.views.create_realm'),
|
||||
|
||||
# Global public streams (Zulip's way of doing archives)
|
||||
url(r'^archive/streams/(?P<stream_id>\d+)/topic/(?P<topic_name>[^/]+)$',
|
||||
url(r'^archive/streams/(?P<stream_id>\d+)/topics/(?P<topic_name>[^/]+)$',
|
||||
zerver.views.archive.archive,
|
||||
name='zerver.views.archive.archive'),
|
||||
url(r'^archive/streams/(?P<stream_id>\d+)/topics$',
|
||||
|
|
Loading…
Reference in New Issue