Skip to content

Commit

Permalink
Test for embed handler
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Jan 16, 2016
1 parent 1b36a62 commit c1da257
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 12 additions & 0 deletions tests/handlers/test_embed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from tests import BaseTestCase


class TestEmbedVisualization(BaseTestCase):
def test_sucesss(self):
vis = self.factory.create_visualization()
vis.query.latest_query_data = self.factory.create_query_result()
vis.query.save()

res = self.make_request("get", "/embed/query/{}/visualization/{}".format(vis.query.id, vis.id), is_json=False)
self.assertEqual(res.status_code, 200)

2 changes: 0 additions & 2 deletions tests/test_authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@ def test_creates_vaild_new_user(self):
name = 'Test User'

with patch('redash.authentication.google_oauth.login_user') as login_user_mock:

create_and_login_user(self.factory.org, name, email)

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


0 comments on commit c1da257

Please sign in to comment.