Skip to content

Commit e9e9a49

Browse files
committed
POP-2277 consistent camel to underscoring
1 parent 7d7f43b commit e9e9a49

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

dynatademand/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ def logout(self):
113113
def get_project(self, project_id):
114114
return self._api_get('/projects/{}'.format(project_id))
115115

116-
def get_lineitem(self, project_id, lineitem_id):
117-
return self._api_get('/projects/{}/lineItems/{}'.format(project_id, lineitem_id))
116+
def get_line_item(self, project_id, line_item_id):
117+
return self._api_get('/projects/{}/lineItems/{}'.format(project_id, line_item_id))
118118

119-
def get_lineitems(self, project_id):
119+
def get_line_items(self, project_id):
120120
return self._api_get('/projects/{}/lineItems'.format(project_id))
121121

122122
def get_feasibility(self, project_id):

tests/test_lineitems.py renamed to tests/test_line_items.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ def setUp(self):
2121
self.api._access_token = 'Bearer testtoken'
2222

2323
@responses.activate
24-
def test_get_lineitem(self):
25-
with open('./tests/test_files/get_lineitem.json', 'r') as lineitem_file:
26-
lineitem_json = json.load(lineitem_file)
27-
responses.add(responses.GET, '{}/sample/v1/projects/1/lineItems/100'.format(BASE_HOST), json=lineitem_json, status=200)
28-
self.api.get_lineitem(1, 100)
24+
def test_get_line_item(self):
25+
with open('./tests/test_files/get_line_item.json', 'r') as line_item_file:
26+
line_item_json = json.load(line_item_file)
27+
responses.add(responses.GET, '{}/sample/v1/projects/1/lineItems/100'.format(BASE_HOST), json=line_item_json, status=200)
28+
self.api.get_line_item(1, 100)
2929
self.assertEqual(len(responses.calls), 1)
30-
self.assertEqual(responses.calls[0].response.json(), lineitem_json)
30+
self.assertEqual(responses.calls[0].response.json(), line_item_json)
3131

3232
@responses.activate
33-
def test_get_lineitems(self):
34-
with open('./tests/test_files/get_lineitems.json', 'r') as lineitem_file:
35-
lineitem_json = json.load(lineitem_file)
36-
responses.add(responses.GET, '{}/sample/v1/projects/1/lineItems'.format(BASE_HOST), json=lineitem_json, status=200)
37-
self.api.get_lineitems(1)
33+
def test_get_line_items(self):
34+
with open('./tests/test_files/get_line_items.json', 'r') as line_item_file:
35+
line_item_json = json.load(line_item_file)
36+
responses.add(responses.GET, '{}/sample/v1/projects/1/lineItems'.format(BASE_HOST), json=line_item_json, status=200)
37+
self.api.get_line_items(1)
3838
self.assertEqual(len(responses.calls), 1)
39-
self.assertEqual(responses.calls[0].response.json(), lineitem_json)
39+
self.assertEqual(responses.calls[0].response.json(), line_item_json)

0 commit comments

Comments
 (0)