Skip to content

Commit c1da257

Browse files
committed
Test for embed handler
1 parent 1b36a62 commit c1da257

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

tests/handlers/test_embed.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from tests import BaseTestCase
2+
3+
4+
class TestEmbedVisualization(BaseTestCase):
5+
def test_sucesss(self):
6+
vis = self.factory.create_visualization()
7+
vis.query.latest_query_data = self.factory.create_query_result()
8+
vis.query.save()
9+
10+
res = self.make_request("get", "/embed/query/{}/visualization/{}".format(vis.query.id, vis.id), is_json=False)
11+
self.assertEqual(res.status_code, 200)
12+

tests/test_authentication.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,8 @@ def test_creates_vaild_new_user(self):
121121
name = 'Test User'
122122

123123
with patch('redash.authentication.google_oauth.login_user') as login_user_mock:
124-
125124
create_and_login_user(self.factory.org, name, email)
126125

127126
self.assertTrue(login_user_mock.called)
128127
user = models.User.get(models.User.email == email)
129128

130-

0 commit comments

Comments
 (0)