Addressing codacy issues

This commit is contained in:
Mitsuo Takaki
2018-03-18 17:44:01 -07:00
parent 1899e95642
commit d3c14e6491
3 changed files with 15 additions and 13 deletions

View File

@@ -294,9 +294,10 @@ class Expectaction(object):
class HttpStatus(Expectaction):
def __init__(self, configuration):
self.status_range = self.parse_range(configuration['status_range'])
self.status_range = HttpStatus.parse_range(configuration['status_range'])
def parse_range(self, range_string):
@staticmethod
def parse_range(range_string):
statuses = range_string.split("-")
if len(statuses) == 1:
# When there was no range given, we should treat the first number as a single status check.