-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Clarify how to get office doc default views. * Added link to MS Online Doc Viewer site * Ooops... use RestructuredText markup, not Markdown * Add python 3 support and tests Co-authored-by: Ross Jones <[email protected]> Co-authored-by: Joel Natividad <[email protected]>
- Loading branch information
1 parent
b017fc1
commit a68736e
Showing
6 changed files
with
42 additions
and
14 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 |
---|---|---|
|
@@ -39,4 +39,6 @@ nosetests.xml | |
coverage.xml | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/_build/ | ||
|
||
.DS_Store |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import ckan.plugins as p | ||
from ckan.tests import factories | ||
|
||
def test_view_on_resource_page(): | ||
sysadmin = factories.Sysadmin() | ||
dataset = factories.Dataset() | ||
resource = factories.Resource( | ||
package_id = dataset['id'], | ||
url = 'http://link.to.some.data', | ||
format = 'XLS' | ||
) | ||
resource_view = factories.ResourceView( | ||
resource_id = resource['id'], | ||
title = 'Preview', | ||
view_type = 'officedocs_view' | ||
) | ||
|
||
response = p.toolkit.get_action('resource_view_show')( | ||
{'user': sysadmin.get('name')}, | ||
{'id': resource_view.get('id')} | ||
) | ||
|
||
assert response.get('title') == 'Preview' | ||
assert response.get('view_type') == 'officedocs_view' |
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