Merge lp:~matsubara/maas-test/bug-1351488 into lp:maas-test

Proposed by Diogo Matsubara
Status: Merged
Approved by: Diogo Matsubara
Approved revision: 158
Merged at revision: 158
Proposed branch: lp:~matsubara/maas-test/bug-1351488
Merge into: lp:maas-test
Diff against target: 15 lines (+4/-1)
1 file modified
maastest/maasfixture.py (+4/-1)
To merge this branch: bzr merge lp:~matsubara/maas-test/bug-1351488
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+229801@code.launchpad.net

Commit message

Fix query_api_key() to deal with output of recent django-admin.py version.

Description of the change

This branch deals with a change in python-django ubuntu package (1.6.5-3) that outputs the python version being used which makes MAASFixture.query_api_key() method return the wrong value. See bug 1351488 for more details.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve
Revision history for this message
Diogo Matsubara (matsubara) wrote :

Thanks Julian!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maastest/maasfixture.py'
2--- maastest/maasfixture.py 2014-04-28 11:23:48 +0000
3+++ maastest/maasfixture.py 2014-08-06 14:33:05 +0000
4@@ -186,7 +186,10 @@
5 'sudo', self.maas_admin, 'apikey',
6 '--username=%s' % username,
7 ], check_call=True)
8- return stdout.strip()
9+ # In recent versions of the Ubuntu python-django package (>1.6.5-3),
10+ # django-admin was replaced by a script that outputs which version of
11+ # python is being used.
12+ return stdout.splitlines()[-1]
13
14 def create_maas_admin(self):
15 """Create a MAAS admin user.

Subscribers

People subscribed via source and target branches