Skip to content

Commit

Permalink
Mock adapted resource_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Oderbolz committed Nov 7, 2018
1 parent 982773f commit 7b2ec03
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ckanext/xloader/tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

SOURCE_URL = 'http://www.example.com/static/file'

def mock_actions(resource_url=SOURCE_URL):
def mock_actions(resource_url=None):
def decorator(func):
'''
Decorator that mocks actions used by these tests
Expand Down Expand Up @@ -273,7 +273,10 @@ def test_umlaut_and_extra_comma(self):
def test_resource_url_with_umlaut(self):
# test that xloader can handle URLs with umlauts
# e.g. http://www.web.statistik.zh.ch/ogd/data/KANTON_ZUERICH_gpfi_Jahresrechung_Zweckverbände.csv
self.register_urls(filename='umlaut_name_äöü.csv')
self.register_urls(
filename='umlaut_name_äöü.csv',
resource_url='http://example.com/umlaut_name_äöü.csv'
)
data = {
'api_key': self.api_key,
'job_type': 'xloader_to_datastore',
Expand Down

0 comments on commit 7b2ec03

Please sign in to comment.