forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.py
21 lines (17 loc) · 885 Bytes
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import ujson
from django.test import TestCase
class EndpointDiscoveryTest(TestCase):
def test_staging_user(self):
# type: () -> None
response = self.client.get("/api/v1/deployments/endpoints", {"email": "[email protected]"})
data = ujson.loads(response.content)
self.assertEqual(data["result"]["base_site_url"], "https://zulip.com/")
self.assertEqual(data["result"]["base_api_url"], "https://zulip.com/api/")
def test_prod_user(self):
# type: () -> None
response = self.client.get("/api/v1/deployments/endpoints", {"email": "[email protected]"})
data = ujson.loads(response.content)
self.assertEqual(data["result"]["base_site_url"], "https://zulip.com/")
self.assertEqual(data["result"]["base_api_url"], "https://api.zulip.com/")