Skip to content

Commit 501ba21

Browse files
committed
Update tests
1 parent f4e7661 commit 501ba21

File tree

5 files changed

+18
-3
lines changed

5 files changed

+18
-3
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
* 0.9.10 (August 7, 2024)
5+
* Update intuit-oauth dependency
6+
* Fix issues with Invoice Sharable Link
7+
* Added optional params to get
8+
49
* 0.9.9 (July 9, 2024)
510
* Removed simplejson
611
* Added use_decimal option (See PR: https://github.com/ej2/python-quickbooks/pull/356 for details)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def read(*parts):
1010
return fp.read()
1111

1212

13-
VERSION = (0, 9, 9)
13+
VERSION = (0, 9, 10)
1414
version = '.'.join(map(str, VERSION))
1515

1616
setup(

tests/unit/objects/test_invoice.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_to_ref(self):
5151
self.assertEqual(ref.name, 1) # should be DocNumber
5252
self.assertEqual(ref.value, 2) # should be Id
5353

54+
5455
class DeliveryInfoTests(unittest.TestCase):
5556
def test_init(self):
5657
info = DeliveryInfo()

tests/unit/test_client.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,16 @@ def test_get_single_object(self, make_req):
138138

139139
qb_client.get_single_object("test", 1)
140140
url = "https://sandbox-quickbooks.api.intuit.com/v3/company/1234/test/1/"
141-
make_req.assert_called_with("GET", url, {})
141+
make_req.assert_called_with("GET", url, {}, params=None)
142+
143+
@patch('quickbooks.client.QuickBooks.make_request')
144+
def test_get_single_object_with_params(self, make_req):
145+
qb_client = client.QuickBooks(auth_client=self.auth_client)
146+
qb_client.company_id = "1234"
147+
148+
qb_client.get_single_object("test", 1, params={'param':'value'})
149+
url = "https://sandbox-quickbooks.api.intuit.com/v3/company/1234/test/1/"
150+
make_req.assert_called_with("GET", url, {}, params={'param':'value'})
142151

143152
@patch('quickbooks.client.QuickBooks.process_request')
144153
def test_make_request(self, process_request):

tests/unit/test_mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class ReadMixinTest(QuickbooksUnitTestCase):
210210
@patch('quickbooks.mixins.QuickBooks.get_single_object')
211211
def test_get(self, get_single_object):
212212
Department.get(1)
213-
get_single_object.assert_called_once_with("Department", pk=1)
213+
get_single_object.assert_called_once_with("Department", pk=1, params=None)
214214

215215
def test_get_with_qb(self):
216216
with patch.object(self.qb_client, 'get_single_object') as get_single_object:

0 commit comments

Comments
 (0)