Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -331,3 +331,22 @@ def test_09_activities_that_should_not_show(self): | |
after = self.dashboard_activity_list(self.new_user) | ||
|
||
assert before == after | ||
|
||
def test_10_dashboard_activity_list_html(self): | ||
'''Test that dashboard activity list html call works.''' | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
params = json.dumps({'name': 'irrelevant_dataset'}) | ||
response = self.app.post('/api/action/package_create', params=params, | ||
extra_environ={'Authorization': str(self.annafan['apikey'])}) | ||
assert response.json['success'] is True | ||
This comment has been minimized.
Sorry, something went wrong.
seanh
Contributor
|
||
|
||
params = json.dumps({'name': 'another_irrelevant_dataset'}) | ||
response = self.app.post('/api/action/package_create', params=params, | ||
extra_environ={'Authorization': str(self.annafan['apikey'])}) | ||
assert response.json['success'] is True | ||
|
||
res = self.app.get('/api/3/action/dashboard_activity_list_html', | ||
extra_environ={'Authorization': | ||
str(self.annafan['apikey'])}) | ||
print res.json['result'] | ||
This comment has been minimized.
Sorry, something went wrong.
seanh
Contributor
|
||
assert res.json['success'] is True |
This docstrings could be a little clearer, "works" is quite ambiguous. All this tests is that it returns successfully, Maybe ''Test that dashboard activity list html call doesn't crash.'' You could just rename the method to
test_10_dashboard_activity_list_html_does_not_crash
and then you wouldn't even need the docstring.