Merge lp:~elopio/ubuntuone-testing/fixfiles into lp:ubuntuone-testing

Proposed by Leo Arias
Status: Merged
Approved by: Rick McBride
Approved revision: 82
Merged at revision: 82
Proposed branch: lp:~elopio/ubuntuone-testing/fixfiles
Merge into: lp:ubuntuone-testing
Prerequisite: lp:~elopio/ubuntuone-testing/removenotes
Diff against target: 30 lines (+10/-3)
1 file modified
ubuntuone/web/tests/sst/shared/actions/files.py (+10/-3)
To merge this branch: bzr merge lp:~elopio/ubuntuone-testing/fixfiles
Reviewer Review Type Date Requested Status
Rick McBride (community) Approve
Review via email: mp+97772@code.launchpad.net

Commit message

Select the right files URL, depending on the test environment.

Description of the change

Select the right files URL, depending on the test environment.

To post a comment you must log in.
Revision history for this message
Rick McBride (rmcbride) :
review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

The prerequisite lp:~elopio/ubuntuone-testing/removenotes has not yet been merged into lp:ubuntuone-testing.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/web/tests/sst/shared/actions/files.py'
2--- ubuntuone/web/tests/sst/shared/actions/files.py 2012-02-02 00:15:52 +0000
3+++ ubuntuone/web/tests/sst/shared/actions/files.py 2012-03-15 23:18:29 +0000
4@@ -22,6 +22,7 @@
5 from sst.actions import *
6 from sst.actions import _get_elem
7 from loading import *
8+from config import *
9 import urlparse
10
11 def open():
12@@ -197,9 +198,15 @@
13 identifier -- The identifier of the file.
14
15 """
16- # TODO the URL should be taken from the config.
17- url = 'https://files.staging.one.ubuntu.com/' + str(identifier[3:])
18- return get_element(css_class='download-button', href=url)
19+ files_url = None
20+ if ENVIRONMENT == 'staging':
21+ files_url = 'https://files.staging.one.ubuntu.com/'
22+ elif ENVIRONMENT == 'edge':
23+ files_url = 'https://files.edge.one.ubuntu.com/'
24+ elif ENVIRONMENT == 'production':
25+ files_url = 'https://files.one.ubuntu.com/'
26+ file_url = files_url + str(identifier[3:])
27+ return get_element(css_class='download-button', href=file_url)
28
29 def _get_link_delete_file(identifier):
30 """Get the Delete file link element.

Subscribers

People subscribed via source and target branches