Adding links pointing to the new user profile page (#1704)

* Adding links pointing to the new user profile page

* Raising coverage

* Fixing tests
This commit is contained in:
Maxime Beauchemin
2016-12-01 15:21:18 -08:00
committed by GitHub
parent 50da4f8c07
commit 7eef46e941
7 changed files with 79 additions and 34 deletions

View File

@@ -478,6 +478,23 @@ class CoreTests(SupersetTestCase):
def test_user_profile(self):
self.login(username='admin')
slc = self.get_slice("Girls", db.session)
# Setting some faves
url = '/superset/favstar/Slice/{}/select/'.format(slc.id)
resp = self.get_json_resp(url)
self.assertEqual(resp['count'], 1)
dash = (
db.session
.query(models.Dashboard)
.filter_by(slug="births")
.first()
)
url = '/superset/favstar/Dashboard/{}/select/'.format(dash.id)
resp = self.get_json_resp(url)
self.assertEqual(resp['count'], 1)
userid = appbuilder.sm.find_user('admin').id
resp = self.get_resp('/superset/profile/admin/')
self.assertIn('"app"', resp)