From 8b71426c7c38038d65a9d1f5c976614a914780e9 Mon Sep 17 00:00:00 2001 From: Stavros Sachtouris Date: Fri, 8 Mar 2013 14:17:31 +0200 Subject: [PATCH] Unittest clients.pithos set account group --- kamaki/clients/test/pithos.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kamaki/clients/test/pithos.py b/kamaki/clients/test/pithos.py index 98bf011..cdab094 100644 --- a/kamaki/clients/test/pithos.py +++ b/kamaki/clients/test/pithos.py @@ -741,3 +741,12 @@ class Pithos(TestCase): exp_args['if_etag_not_match'] = kwargs.pop('if_none_match') exp_args.update(kwargs) self.assertEqual(get.mock_calls[-1], call(obj, **exp_args)) + + def test_set_account_group(self): + group = 'aU53rGr0up' + usernames = ['u1', 'u2', 'u3'] + with patch.object(PC, 'account_post', return_value=self.FR()) as post: + self.client.set_account_group(group, usernames) + self.assertEqual( + post.mock_calls[-1], + call(update=True, groups={group: usernames})) -- 1.7.10.4