-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[explore-v2] add config option for explore v2 beta users, and send th…
…rough v2 path (#1671) * add config option for explore v2 beta users, and send through v2 path * fix long lines * use role rather than user ids in config * add test * simplify role check * remove extra line * use different test user for v2 tests
- Loading branch information
Alanna Scott
authored
Dec 13, 2016
1 parent
2254a4d
commit 34e107e
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,27 @@ def test_slices(self): | |
print("[{name}]/[{method}]: {url}".format(**locals())) | ||
self.client.get(url) | ||
|
||
def test_slices_V2(self): | ||
# Add explore-v2-beta role to admin user | ||
# Test all slice urls as user with with explore-v2-beta role | ||
sm.add_role('explore-v2-beta') | ||
|
||
appbuilder.sm.add_user( | ||
'explore_beta', 'explore_beta', ' user', '[email protected]', | ||
appbuilder.sm.find_role('explore-v2-beta'), | ||
password='general') | ||
self.login(username='explore_beta', password='general') | ||
|
||
Slc = models.Slice | ||
urls = [] | ||
for slc in db.session.query(Slc).all(): | ||
urls += [ | ||
(slc.slice_name, 'slice_url', slc.slice_url), | ||
] | ||
for name, method, url in urls: | ||
print("[{name}]/[{method}]: {url}".format(**locals())) | ||
response = self.client.get(url) | ||
|
||
def test_dashboard(self): | ||
self.login(username='admin') | ||
urls = {} | ||
|