File tree Expand file tree Collapse file tree
test/integration/component Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1103,21 +1103,27 @@ def test_disassociate_ip_address_other_account(self):
11031103 self .fail ("Failed to create portable ip: %s" % e )
11041104
11051105 try :
1106- self .user_account = Account .create (
1106+ self .otherAccount = Account .create (
11071107 self .apiclient ,
11081108 self .services ["account" ],
11091109 domainid = self .domain .id
11101110 )
1111+ self .cleanup .append (self .otherAccount )
11111112
1112- self .api_client_user = self .testClient .getUserApiClient (
1113- UserName = self .user_account .name ,
1114- DomainName = self .user_account .domain
1113+ self .apiclientOtherAccount = self .testClient .getUserApiClient (
1114+ UserName = self .otherAccount .name ,
1115+ DomainName = self .otherAccount .domain
11151116 )
11161117
1118+ # Trying to disassociate portable ip using
1119+ # api client of other account than the one
1120+ # used to create portable ip
11171121 with self .assertRaises (Exception ):
1118- portableip .delete (self .api_client_user )
1119- except Exception as e :
1122+ portableip .delete (self .apiclientOtherAccount )
1123+
1124+ # Disassociate IP using api client of account used to create it
11201125 portableip .delete (self .apiclient )
1126+ except Exception as e :
11211127 self .fail ("Exception while disassociating portable ip: %s" % e )
11221128 return
11231129
You can’t perform that action at this time.
0 commit comments