Skip to content

Commit c87f8d9

Browse files
committed
fix lint
1 parent 288ee1f commit c87f8d9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dynatademand/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _api_get(self, uri, query_params=None):
7171
if response.headers['content-type'] == 'application/pdf':
7272
return response.content
7373
return response.json()
74-
74+
7575
def _api_delete(self, uri):
7676
# Send an authenticated DELETE request to an API endpoint.
7777
self._check_authentication()
@@ -486,7 +486,7 @@ def create_template(self, template):
486486
# request_body=template,
487487
# )
488488
return self._api_post('/templates/quotaplan', template)
489-
489+
490490
def update_template(self, id, template):
491491
# TODO: Waiting on a valid path and request body schema.
492492
# self.validator.validate_request(
@@ -495,7 +495,7 @@ def update_template(self, id, template):
495495
# request_body=template,
496496
# )
497497
return self._api_post('/templates/quotaplan/{}'.format(id), template)
498-
498+
499499
def delete_template(self, id):
500500
self.validator.validate_request(
501501
'delete_template',
@@ -512,4 +512,4 @@ def get_templates(self, country, lang, **kwargs):
512512
},
513513
query_params=kwargs,
514514
)
515-
return self._api_get('/templates/quotaplan/{}/{}'.format(country, lang), kwargs)
515+
return self._api_get('/templates/quotaplan/{}/{}'.format(country, lang), kwargs)

tests/test_template.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import responses
77

88
from dynatademand.api import DemandAPIClient
9-
from dynatademand.errors import DemandAPIError
109

1110
BASE_HOST = "http://test-url.example"
1211

@@ -20,7 +19,9 @@ def test_get_templates(self):
2019
# Tests getting all templates.
2120
with open('./tests/test_files/get_templates.json', 'r') as options:
2221
options_json = json.load(options)
23-
responses.add(responses.GET, '{}/sample/v1/templates/quotaplan/{}/{}'.format(BASE_HOST, 'US', 'en'), json=options_json, status=200)
22+
responses.add(responses.GET, '{}/sample/v1/templates/quotaplan/{}/{}'.format(BASE_HOST, 'US', 'en'),
23+
json=options_json,
24+
status=200)
2425
self.api.get_templates('US', 'en')
2526
self.assertEqual(len(responses.calls), 1)
2627

@@ -65,8 +66,7 @@ def test_update_template(self):
6566
# Test success response
6667
self.api.update_template(1, new_template_data)
6768
self.assertEqual(len(responses.calls), 1)
68-
69-
69+
7070
@responses.activate
7171
def test_delete_template(self):
7272
# Tests deleteing templates
@@ -85,4 +85,4 @@ def test_delete_template(self):
8585
)
8686
# Test successful response
8787
self.api.delete_template(1)
88-
self.assertEqual(len(responses.calls), 1)
88+
self.assertEqual(len(responses.calls), 1)

0 commit comments

Comments
 (0)