[Trivial]Do not use cls in instance method
cls should not be used in instance method, self should be used instead.
Change-Id: Ia125ffac1b42a1fe05b28dee7080e298426e7f2d
diff --git a/tempest/api/compute/security_groups/test_security_group_rules.py b/tempest/api/compute/security_groups/test_security_group_rules.py
index 59848f6..3c4daf6 100644
--- a/tempest/api/compute/security_groups/test_security_group_rules.py
+++ b/tempest/api/compute/security_groups/test_security_group_rules.py
@@ -35,16 +35,16 @@
cls.from_port = 22
cls.to_port = 22
- def setUp(cls):
- super(SecurityGroupRulesTestJSON, cls).setUp()
+ def setUp(self):
+ super(SecurityGroupRulesTestJSON, self).setUp()
- from_port = cls.from_port
- to_port = cls.to_port
+ from_port = self.from_port
+ to_port = self.to_port
group = {}
ip_range = {}
- cls.expected = {
+ self.expected = {
'parent_group_id': None,
- 'ip_protocol': cls.ip_protocol,
+ 'ip_protocol': self.ip_protocol,
'from_port': from_port,
'to_port': to_port,
'ip_range': ip_range,