1+ import unittest
2+
13"""Simple integration tests for the AWS IAM actors."""
24
35import logging
46
57from nose .plugins .attrib import attr
6- from tornado import testing
78
89from kingpin .actors .aws import iam
910
1314logging .getLogger ("boto" ).setLevel (logging .INFO )
1415
1516
16- class IntegrationIAMUsers (testing . AsyncTestCase ):
17+ class IntegrationIAMUsers (unittest . IsolatedAsyncioTestCase ):
1718
1819 integration = True
1920
@@ -22,13 +23,11 @@ class IntegrationIAMUsers(testing.AsyncTestCase):
2223 region = "us-east-1"
2324
2425 @attr ("aws" , "integration" )
25- @testing .gen_test (timeout = 60 )
2626 def integration_01_ensure_user_absent (self ):
2727 actor = iam .User ("Test" , {"name" : self .name , "state" : "absent" }, dry = False )
2828 yield actor .execute ()
2929
3030 @attr ("aws" , "integration" , "dry" )
31- @testing .gen_test (timeout = 60 )
3231 def integration_02a_create_user_dry (self ):
3332 actor = iam .User (
3433 "Test" ,
@@ -44,7 +43,6 @@ def integration_02a_create_user_dry(self):
4443 yield actor .execute ()
4544
4645 @attr ("aws" , "integration" )
47- @testing .gen_test (timeout = 60 )
4846 def integration_02b_create_user (self ):
4947 actor = iam .User (
5048 "Test" ,
@@ -60,13 +58,12 @@ def integration_02b_create_user(self):
6058
6159 # Final cleanup -- delete our test user!
6260 @attr ("aws" , "integration" )
63- @testing .gen_test (timeout = 60 )
6461 def integration_09_ensure_user_absent (self ):
6562 actor = iam .User ("Test" , {"name" : self .name , "state" : "absent" }, dry = False )
6663 yield actor .execute ()
6764
6865
69- class IntegrationIAMGroups (testing . AsyncTestCase ):
66+ class IntegrationIAMGroups (unittest . IsolatedAsyncioTestCase ):
7067
7168 integration = True
7269
@@ -75,13 +72,11 @@ class IntegrationIAMGroups(testing.AsyncTestCase):
7572 region = "us-east-1"
7673
7774 @attr ("aws" , "integration" )
78- @testing .gen_test (timeout = 60 )
7975 def integration_01_ensure_group_absent (self ):
8076 actor = iam .Group ("Test" , {"name" : self .name , "state" : "absent" }, dry = False )
8177 yield actor .execute ()
8278
8379 @attr ("aws" , "integration" , "dry" )
84- @testing .gen_test (timeout = 60 )
8580 def integration_02a_create_group_dry (self ):
8681 actor = iam .Group (
8782 "Test" ,
@@ -97,7 +92,6 @@ def integration_02a_create_group_dry(self):
9792 yield actor .execute ()
9893
9994 @attr ("aws" , "integration" )
100- @testing .gen_test (timeout = 60 )
10195 def integration_02b_create_group (self ):
10296 actor = iam .Group (
10397 "Test" ,
@@ -113,13 +107,12 @@ def integration_02b_create_group(self):
113107
114108 # Final cleanup -- delete our test group!
115109 @attr ("aws" , "integration" )
116- @testing .gen_test (timeout = 60 )
117110 def integration_09_ensure_group_absent (self ):
118111 actor = iam .Group ("Test" , {"name" : self .name , "state" : "absent" }, dry = False )
119112 yield actor .execute ()
120113
121114
122- class IntegrationIAMRoles (testing . AsyncTestCase ):
115+ class IntegrationIAMRoles (unittest . IsolatedAsyncioTestCase ):
123116
124117 integration = True
125118
@@ -128,13 +121,11 @@ class IntegrationIAMRoles(testing.AsyncTestCase):
128121 region = "us-east-1"
129122
130123 @attr ("aws" , "integration" )
131- @testing .gen_test (timeout = 60 )
132124 def integration_01_ensure_role_absent (self ):
133125 actor = iam .Role ("Test" , {"name" : self .name , "state" : "absent" }, dry = False )
134126 yield actor .execute ()
135127
136128 @attr ("aws" , "integration" , "dry" )
137- @testing .gen_test (timeout = 60 )
138129 def integration_02a_create_role_dry (self ):
139130 actor = iam .Role (
140131 "Test" ,
@@ -150,7 +141,6 @@ def integration_02a_create_role_dry(self):
150141 yield actor .execute ()
151142
152143 @attr ("aws" , "integration" )
153- @testing .gen_test (timeout = 60 )
154144 def integration_02b_create_role (self ):
155145 actor = iam .Role (
156146 "Test" ,
@@ -166,13 +156,12 @@ def integration_02b_create_role(self):
166156
167157 # Final cleanup -- delete our test role!
168158 @attr ("aws" , "integration" )
169- @testing .gen_test (timeout = 60 )
170159 def integration_09_ensure_role_absent (self ):
171160 actor = iam .Role ("Test" , {"name" : self .name , "state" : "absent" }, dry = False )
172161 yield actor .execute ()
173162
174163
175- class IntegrationIAMInstanceProfiles (testing . AsyncTestCase ):
164+ class IntegrationIAMInstanceProfiles (unittest . IsolatedAsyncioTestCase ):
176165
177166 integration = True
178167
@@ -181,15 +170,13 @@ class IntegrationIAMInstanceProfiles(testing.AsyncTestCase):
181170 region = "us-east-1"
182171
183172 @attr ("aws" , "integration" )
184- @testing .gen_test (timeout = 60 )
185173 def integration_01_ensure_profile_absent (self ):
186174 actor = iam .InstanceProfile (
187175 "Test" , {"name" : self .name , "state" : "absent" }, dry = False
188176 )
189177 yield actor .execute ()
190178
191179 @attr ("aws" , "integration" , "dry" )
192- @testing .gen_test (timeout = 60 )
193180 def integration_02a_create_profile_dry (self ):
194181 actor = iam .InstanceProfile (
195182 "Test" ,
@@ -205,7 +192,6 @@ def integration_02a_create_profile_dry(self):
205192 yield actor .execute ()
206193
207194 @attr ("aws" , "integration" )
208- @testing .gen_test (timeout = 60 )
209195 def integration_02b_create_profile (self ):
210196 actor = iam .InstanceProfile (
211197 "Test" ,
@@ -221,7 +207,6 @@ def integration_02b_create_profile(self):
221207
222208 # Final cleanup -- delete our test profile!
223209 @attr ("aws" , "integration" )
224- @testing .gen_test (timeout = 60 )
225210 def integration_09_ensure_profile_absent (self ):
226211 actor = iam .InstanceProfile (
227212 "Test" , {"name" : self .name , "state" : "absent" }, dry = False
0 commit comments