Skip to content

Commit 88b7cf2

Browse files
committed
Fixed long lines
1 parent 5a8a18b commit 88b7cf2

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tests/test_line_items.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,25 @@ def test_get_line_item_detailed_report(self):
5454
@responses.activate
5555
def test_pause_lineitem(self):
5656
# Tests pausing a line item.
57-
responses.add(responses.POST, '{}/sample/v1/projects/24/lineItems/180/pause'.format(BASE_HOST), json={'status': {'message': 'success'}}, status=200)
58-
responses.add(responses.POST, '{}/sample/v1/projects/24/lineItems/180/pause'.format(BASE_HOST), json={'status': {'message': 'error'}}, status=200)
57+
responses.add(
58+
responses.POST,
59+
'{}/sample/v1/projects/24/lineItems/180/pause'.format(BASE_HOST),
60+
json={'status': {'message': 'success'}},
61+
status=200
62+
)
63+
# Response with error
64+
responses.add(
65+
responses.POST,
66+
'{}/sample/v1/projects/24/lineItems/180/pause'.format(BASE_HOST),
67+
json={'status': {'message': 'error'}},
68+
status=200
69+
)
70+
71+
# Test successful response
5972
self.api.pause_line_item(24, 180)
6073
self.assertEqual(len(responses.calls), 1)
74+
75+
# Test error response
6176
with self.assertRaises(DemandAPIError):
6277
self.api.pause_line_item(24, 180)
6378
self.assertEqual(len(responses.calls), 2)

0 commit comments

Comments
 (0)