Skip to content

Commit b4014b4

Browse files
committed
fixed for new message
1 parent 1dc7f68 commit b4014b4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/unit/test_client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def test_client_with_deprecated_minor_version(self):
5353
self.assertEqual(self.qb_client.minorversion, 74)
5454
self.assertEqual(len(w), 1)
5555
self.assertTrue(issubclass(w[-1].category, DeprecationWarning))
56-
self.assertTrue("Minor Version no longer supported." in str(w[-1].message))
56+
self.assertTrue("Minor Version 74 is no longer supported" in str(w[-1].message))
57+
self.assertTrue("Minimum supported version is 75" in str(w[-1].message))
5758

5859
def test_api_url(self):
5960
qb_client = client.QuickBooks(sandbox=False)
@@ -128,7 +129,7 @@ def test_update_object_with_request_id(self, make_req):
128129
qb_client.update_object("Customer", "request_body", request_id="123")
129130

130131
url = "https://sandbox-quickbooks.api.intuit.com/v3/company/1234/customer"
131-
make_req.assert_called_with("POST", url, "request_body", file_path=None, file_bytes=None, request_id="123", params={'minorversion': client.QuickBooks.MINIMUM_MINOR_VERSION})
132+
make_req.assert_called_with("POST", url, "request_body", file_path=None, request_id="123", params={'minorversion': client.QuickBooks.MINIMUM_MINOR_VERSION})
132133

133134
@patch('quickbooks.client.QuickBooks.get')
134135
def test_get_current_user(self, get):
@@ -146,7 +147,8 @@ def test_get_report(self, make_req):
146147

147148
qb_client.get_report("profitandloss", {1: 2})
148149
url = "https://sandbox-quickbooks.api.intuit.com/v3/company/1234/reports/profitandloss"
149-
make_req.assert_called_with("GET", url, params={1: 2})
150+
expected_params = {1: 2, 'minorversion': client.QuickBooks.MINIMUM_MINOR_VERSION}
151+
make_req.assert_called_with("GET", url, params=expected_params)
150152

151153
@patch('quickbooks.client.QuickBooks.make_request')
152154
def test_get_single_object(self, make_req):

0 commit comments

Comments
 (0)