3939from cloudant .error import CloudantArgumentError , CloudantClientException
4040from cloudant .feed import Feed , InfiniteFeed
4141
42- from .unit_t_db_base import UnitTestDbBase
42+ from .unit_t_db_base import skip_for_iam , UnitTestDbBase
4343from .. import bytes_ , str_
4444
4545class CloudantClientExceptionTests (unittest .TestCase ):
@@ -164,6 +164,7 @@ def test_multiple_connect(self):
164164 self .client .disconnect ()
165165 self .assertIsNone (self .client .r_session )
166166
167+ @skip_for_iam
167168 def test_auto_renew_enabled (self ):
168169 """
169170 Test that CookieSession is used when auto_renew is enabled.
@@ -178,6 +179,7 @@ def test_auto_renew_enabled(self):
178179 finally :
179180 self .client .disconnect ()
180181
182+ @skip_for_iam
181183 def test_auto_renew_enabled_with_auto_connect (self ):
182184 """
183185 Test that CookieSession is used when auto_renew is enabled along with
@@ -192,6 +194,7 @@ def test_auto_renew_enabled_with_auto_connect(self):
192194 finally :
193195 self .client .disconnect ()
194196
197+ @skip_for_iam
195198 def test_session (self ):
196199 """
197200 Test getting session information.
@@ -207,6 +210,7 @@ def test_session(self):
207210 finally :
208211 self .client .disconnect ()
209212
213+ @skip_for_iam
210214 def test_session_cookie (self ):
211215 """
212216 Test getting the session cookie.
@@ -315,6 +319,7 @@ def test_change_credentials_basic(self, m_req):
315319 )
316320 self .assertEquals (all_dbs , ['animaldb' ])
317321
322+ @skip_for_iam
318323 def test_basic_auth_str (self ):
319324 """
320325 Test getting the basic authentication string.
@@ -589,6 +594,7 @@ class CloudantClientTests(UnitTestDbBase):
589594 Cloudant specific client unit tests
590595 """
591596
597+ @skip_for_iam
592598 def test_cloudant_session_login (self ):
593599 """
594600 Test that the Cloudant client session successfully authenticates.
@@ -601,6 +607,7 @@ def test_cloudant_session_login(self):
601607 self .client .session_login ()
602608 self .assertNotEqual (self .client .session_cookie (), old_cookie )
603609
610+ @skip_for_iam
604611 def test_cloudant_session_login_with_new_credentials (self ):
605612 """
606613 Test that the Cloudant client session fails to authenticate when
@@ -613,6 +620,7 @@ def test_cloudant_session_login_with_new_credentials(self):
613620
614621 self .assertTrue (str (cm .exception ).find ('Name or password is incorrect' ))
615622
623+ @skip_for_iam
616624 def test_cloudant_context_helper (self ):
617625 """
618626 Test that the cloudant context helper works as expected.
@@ -624,6 +632,7 @@ def test_cloudant_context_helper(self):
624632 except Exception as err :
625633 self .fail ('Exception {0} was raised.' .format (str (err )))
626634
635+ @skip_for_iam
627636 def test_cloudant_bluemix_context_helper (self ):
628637 """
629638 Test that the cloudant_bluemix context helper works as expected.
@@ -688,6 +697,7 @@ def test_constructor_with_account(self):
688697 'https://{0}.cloudant.com' .format (self .account )
689698 )
690699
700+ @skip_for_iam
691701 def test_bluemix_constructor (self ):
692702 """
693703 Test instantiating a client object using a VCAP_SERVICES environment
@@ -720,6 +730,7 @@ def test_bluemix_constructor(self):
720730 finally :
721731 c .disconnect ()
722732
733+ @skip_for_iam
723734 def test_bluemix_constructor_specify_instance_name (self ):
724735 """
725736 Test instantiating a client object using a VCAP_SERVICES environment
@@ -752,6 +763,7 @@ def test_bluemix_constructor_specify_instance_name(self):
752763 finally :
753764 c .disconnect ()
754765
766+ @skip_for_iam
755767 def test_bluemix_constructor_with_multiple_services (self ):
756768 """
757769 Test instantiating a client object using a VCAP_SERVICES environment
@@ -819,6 +831,7 @@ def test_connect_headers(self):
819831 finally :
820832 self .client .disconnect ()
821833
834+ @skip_for_iam
822835 def test_connect_timeout (self ):
823836 """
824837 Test that a connect timeout occurs when instantiating
@@ -845,6 +858,7 @@ def test_db_updates_infinite_feed_call(self):
845858 finally :
846859 self .client .disconnect ()
847860
861+ @skip_for_iam
848862 def test_billing_data (self ):
849863 """
850864 Test the retrieval of billing data
@@ -939,6 +953,7 @@ def test_set_year_with_invalid_month_for_billing_data(self):
939953 finally :
940954 self .client .disconnect ()
941955
956+ @skip_for_iam
942957 def test_volume_usage_data (self ):
943958 """
944959 Test the retrieval of volume usage data
@@ -1030,6 +1045,7 @@ def test_set_year_with_invalid_month_for_volume_usage_data(self):
10301045 finally :
10311046 self .client .disconnect ()
10321047
1048+ @skip_for_iam
10331049 def test_requests_usage_data (self ):
10341050 """
10351051 Test the retrieval of requests usage data
@@ -1121,6 +1137,7 @@ def test_set_year_with_invalid_month_for_requests_usage_data(self):
11211137 finally :
11221138 self .client .disconnect ()
11231139
1140+ @skip_for_iam
11241141 def test_shared_databases (self ):
11251142 """
11261143 Test the retrieval of shared database list
@@ -1131,6 +1148,7 @@ def test_shared_databases(self):
11311148 finally :
11321149 self .client .disconnect ()
11331150
1151+ @skip_for_iam
11341152 def test_generate_api_key (self ):
11351153 """
11361154 Test the generation of an API key for this client account
@@ -1144,6 +1162,7 @@ def test_generate_api_key(self):
11441162 finally :
11451163 self .client .disconnect ()
11461164
1165+ @skip_for_iam
11471166 def test_cors_configuration (self ):
11481167 """
11491168 Test the retrieval of the current CORS configuration for this client
@@ -1157,6 +1176,7 @@ def test_cors_configuration(self):
11571176 finally :
11581177 self .client .disconnect ()
11591178
1179+ @skip_for_iam
11601180 def test_cors_origins (self ):
11611181 """
11621182 Test the retrieval of the CORS origins list
@@ -1168,6 +1188,7 @@ def test_cors_origins(self):
11681188 finally :
11691189 self .client .disconnect ()
11701190
1191+ @skip_for_iam
11711192 def test_disable_cors (self ):
11721193 """
11731194 Test disabling CORS (assuming CORS is enabled)
@@ -1188,6 +1209,7 @@ def test_disable_cors(self):
11881209 finally :
11891210 self .client .disconnect ()
11901211
1212+ @skip_for_iam
11911213 def test_update_cors_configuration (self ):
11921214 """
11931215 Test updating CORS configuration
0 commit comments