File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,3 +75,14 @@ def test_get_authorize_url(self):
7575 #
7676 # qb_client.get_authorize_url
7777
78+ def test_isvalid_object_name_valid (self ):
79+ qb_client = client .QuickBooks ()
80+ result = qb_client .isvalid_object_name ("Customer" )
81+
82+ self .assertEquals (result , True )
83+
84+ def test_isvalid_object_name_invalid (self ):
85+ qb_client = client .QuickBooks ()
86+
87+ with self .assertRaises (Exception ):
88+ qb_client .isvalid_object_name ("invalid" )
Original file line number Diff line number Diff line change 1+ import unittest
2+ from mock import patch
3+
4+ from quickbooks .objects .base import PhoneNumber
5+ from quickbooks .objects .department import Department
6+
7+
8+ class ToJsonMixinTest (unittest .TestCase ):
9+ def test_to_json (self ):
10+ phone = PhoneNumber ()
11+ phone .FreeFormNumber = "555-555-5555"
12+
13+ json = phone .to_json ()
14+
15+ self .assertEquals (json , '{\n "FreeFormNumber": "555-555-5555"\n }' )
16+
You can’t perform that action at this time.
0 commit comments