Unittest clients.pithos get account quota
authorStavros Sachtouris <saxtouri@admin.grnet.gr>
Fri, 8 Mar 2013 12:27:39 +0000 (14:27 +0200)
committerStavros Sachtouris <saxtouri@admin.grnet.gr>
Fri, 8 Mar 2013 12:27:39 +0000 (14:27 +0200)
kamaki/clients/test/pithos.py

index 55aecec..ba6de41 100644 (file)
@@ -758,3 +758,9 @@ class Pithos(TestCase):
             self.assertEqual(
                 post.mock_calls[-1],
                 call(update=True, groups={group: []}))
+
+    def test_get_account_quota(self):
+        key = 'x-account-policy-quota'
+        with patch.object(PC, 'get_account_info', return_value=account_info):
+            r = self.client.get_account_quota()
+            self.assertEqual(r[key], account_info[key])