fix: Removed unused self param turning the associated functions into static methods

pull/347/head
chrisr3d 2019-10-27 21:16:31 +01:00
parent e1602fdca9
commit 93858e302a
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 6 additions and 3 deletions

View File

@ -21,21 +21,24 @@ class TestExpansions(unittest.TestCase):
def misp_modules_post(self, query):
return requests.post(urljoin(self.url, "query"), json=query)
def get_data(self, response):
@staticmethod
def get_data(response):
data = response.json()
if not isinstance(data, dict):
print(json.dumps(data, indent=2))
return data
return data['results'][0]['data']
def get_errors(self, response):
@staticmethod
def get_errors(response):
data = response.json()
if not isinstance(data, dict):
print(json.dumps(data, indent=2))
return data
return data['error']
def get_values(self, response):
@staticmethod
def get_values(response):
data = response.json()
if not isinstance(data, dict):
print(json.dumps(data, indent=2))