Skip to content

Commit

Permalink
tests: use HTTPS urls in tests (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomiguelino authored Sep 12, 2024
1 parent 3808372 commit 71f4b57
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'mimetype': u'web',
'asset_id': u'4c8dbce552edb5812d3a866cfe5f159d',
'name': u'WireLoad',
'uri': u'http://www.wireload.net',
'uri': u'https://www.wireload.net',
'start_date': datetime.now() - timedelta(days=1),
'end_date': datetime.now() + timedelta(days=1),
'duration': u'5',
Expand Down Expand Up @@ -104,7 +104,7 @@ def test_add_asset_url(self):

wait_for_and_do(
browser, 'input[name="uri"]',
lambda field: field.fill('http://example.com'))
lambda field: field.fill('https://example.com'))
sleep(1)

wait_for_and_do(browser, '#add-form', lambda form: form.click())
Expand All @@ -119,8 +119,8 @@ def test_add_asset_url(self):
self.assertEqual(len(assets), 1)
asset = assets[0]

self.assertEqual(asset['name'], u'http://example.com')
self.assertEqual(asset['uri'], u'http://example.com')
self.assertEqual(asset['name'], u'https://example.com')
self.assertEqual(asset['uri'], u'https://example.com')
self.assertEqual(asset['mimetype'], u'webpage')
self.assertEqual(asset['duration'], settings['default_duration'])

Expand Down
2 changes: 1 addition & 1 deletion tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'mimetype': u'web',
'asset_id': u'4c8dbce552edb5812d3a866cfe5f159d',
'name': u'WireLoad',
'uri': u'http://www.wireload.net',
'uri': u'https://www.wireload.net',
'start_date': datetime.now() - timedelta(days=3),
'end_date': datetime.now() + timedelta(days=3),
'duration': u'5',
Expand Down
11 changes: 5 additions & 6 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
'mimetype': u'web',
'asset_id': u'4c8dbce552edb5812d3a866cfe5f159e',
'name': u'いろはにほへど',
'uri': u'http://www.wireload.net',
'uri': u'https://www.wireload.net',
'start_date': date_a,
'end_date': date_b,
'duration': u'5',
Expand All @@ -55,7 +55,7 @@
'mimetype': u'web',
'asset_id': u'4c8dbce552edb5812d3a866cfe5f159d',
'name': u'WireLoad',
'uri': u'http://www.wireload.net',
'uri': u'https://www.wireload.net',
'start_date': date_a,
'end_date': date_b,
'duration': u'5',
Expand Down Expand Up @@ -99,10 +99,9 @@
'is_processing': 0,
'skip_asset_check': 0
}
url_fail = 'http://doesnotwork.example.com'
url_redir = 'http://example.com'
url_fail = 'https://doesnotwork.example.com'
url_redir = 'https://example.com'
uri_ = '/home/user/file'
# url_timeout = 'http://...'


class Req(object):
Expand Down Expand Up @@ -255,7 +254,7 @@ def test_update_asset(self):
'mimetype': u'web',
'name': 'New name',
'nocache': 0,
'uri': u'http://www.wireload.net',
'uri': u'https://www.wireload.net',
'skip_asset_check': 0,
'play_order': 1,
'start_date': datetime.datetime(2013, 1, 16, 0, 0)
Expand Down

0 comments on commit 71f4b57

Please sign in to comment.