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

pull/347/head
chrisr3d 3 years ago
parent e1602fdca9
commit 93858e302a
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
  1. 9
      tests/test_expansions.py

@ -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))

Loading…
Cancel
Save