Merge lp:~ubuntuone-pqm-team/charmsupport/trunk into lp:charmsupport

Proposed by Sidnei da Silva
Status: Merged
Approved by: Matthew Wedgwood
Approved revision: 49
Merged at revision: 36
Proposed branch: lp:~ubuntuone-pqm-team/charmsupport/trunk
Merge into: lp:charmsupport
Diff against target: 25 lines (+3/-1)
2 files modified
charmsupport/hookenv.py (+2/-0)
tests/test_hookenv.py (+1/-1)
To merge this branch: bzr merge lp:~ubuntuone-pqm-team/charmsupport/trunk
Reviewer Review Type Date Requested Status
Matthew Wedgwood (community) Approve
Review via email: mp+159219@code.launchpad.net

Commit message

Missing argument needs a '-'

Description of the change

Missing argument needs a '-'

To post a comment you must log in.
Revision history for this message
Matthew Wedgwood (mew) wrote :

Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmsupport/hookenv.py'
2--- charmsupport/hookenv.py 2013-04-02 22:24:59 +0000
3+++ charmsupport/hookenv.py 2013-04-16 19:03:28 +0000
4@@ -114,6 +114,8 @@
5 _args.append(rid)
6 if attribute is not None:
7 _args.append(attribute)
8+ else:
9+ _args.append('-')
10 if unit:
11 _args.append(unit)
12 return json.loads(subprocess.check_output(_args))
13
14=== modified file 'tests/test_hookenv.py'
15--- tests/test_hookenv.py 2013-04-02 22:24:59 +0000
16+++ tests/test_hookenv.py 2013-04-16 19:03:28 +0000
17@@ -407,7 +407,7 @@
18 result = hookenv.relation_get()
19
20 self.assertEqual(result['foo'], 'BAR')
21- check_output.assert_called_with(['relation-get', '--format=json'])
22+ check_output.assert_called_with(['relation-get', '--format=json', '-'])
23
24 @patch('subprocess.check_output')
25 def test_gets_relation_with_scope(self, check_output):

Subscribers

People subscribed via source and target branches