Skip to content

Commit

Permalink
[#4850] fix pep8 issues in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
calexandr committed Dec 25, 2019
1 parent b01ac36 commit c4b5b4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions ckanext/audioview/tests/test_view.py
Expand Up @@ -7,6 +7,7 @@

import pytest


@pytest.mark.ckan_config('ckan.views.default_views', '')
@pytest.mark.ckan_config("ckan.plugins", "audio_view")
@pytest.mark.usefixtures("clean_db", "with_plugins")
Expand All @@ -15,15 +16,15 @@ def test_view_shown_on_resource_page_with_audio_url(app):
dataset = factories.Dataset()

resource = factories.Resource(package_id=dataset['id'],
format='wav')
format='wav')

resource_view = factories.ResourceView(
resource_id=resource['id'],
view_type='audio_view',
audio_url='http://example.wav')

url = url_for('resource.read',
id=dataset['name'], resource_id=resource['id'])
id=dataset['name'], resource_id=resource['id'])

response = app.get(url)

Expand Down
8 changes: 4 additions & 4 deletions ckanext/videoview/tests/test_view.py
Expand Up @@ -11,20 +11,20 @@
@pytest.mark.ckan_config("ckan.plugins", "video_view")
@pytest.mark.usefixtures("clean_db", "with_plugins")
def test_view_shown_on_resource_page_with_video_url(app):

dataset = factories.Dataset()

resource = factories.Resource(package_id=dataset['id'],
format='mp4')
format='mp4')

resource_view = factories.ResourceView(
resource_id=resource['id'],
view_type='video_view',
video_url='https://example/video.mp4')

url = url_for('resource.read',
id=dataset['name'], resource_id=resource['id'])
id=dataset['name'], resource_id=resource['id'])

response = app.get(url)

assert resource_view['video_url'] in response
assert resource_view['video_url'] in response

0 comments on commit c4b5b4a

Please sign in to comment.