Permalink
Browse files

add in active into getting secret and fix uuid (bug 822735)

  • Loading branch information...
1 parent 123ecb8 commit cdfa09ea9217873993b3a25d2145c2f4406ca7d4 @andymckay andymckay committed Dec 18, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 lib/solitude/api.py
  2. +2 −1 lib/solitude/tests.py
View
@@ -92,7 +92,8 @@ def get_secret(self, uuid):
:rtype: dictionary
"""
res = self.parse_res(self.safe_run(self.slumber.generic.product.get,
- uuid=uuid))
+ seller__active=True,
+ seller__uuid=uuid))
if len(res['objects']) != 1:
raise ValueError('Not exactly one result found.')
return res['objects'][0]['secret']
View
@@ -3,7 +3,7 @@
import mock
from nose.exc import SkipTest
-from nose.tools import eq_
+from nose.tools import eq_, ok_
from lib.solitude.api import client
from lib.solitude.errors import ERROR_STRINGS
@@ -141,3 +141,4 @@ def test_some_secret(self, slumber):
slumber.generic.product.get.return_value = {'objects':
[{'secret': 'k'}]}
eq_(client.get_secret('x'), 'k')
+ ok_(slumber.generic.product.get.call_args[1]['seller__active'])

0 comments on commit cdfa09e

Please sign in to comment.