Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ej2 committed Jan 3, 2024
1 parent be3bb11 commit fa75eed
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
9 changes: 4 additions & 5 deletions tests/unit/objects/test_companycurrency.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
from datetime import datetime

import unittest
from quickbooks.objects.companycurrency import CompanyCurrency
from tests.integration.test_base import QuickbooksUnitTestCase


class CompanyCurrencyTest(QuickbooksUnitTestCase):
class CompanyCurrencyTest(unittest.TestCase):
def test_unicode(self):
company_currency = CompanyCurrency()
company_currency.Name = "test"
Expand All @@ -21,4 +19,5 @@ def test_to_ref(self):

self.assertEqual(ref.name, "test")
self.assertEqual(ref.type, "CompanyCurrency")
self.assertEqual(ref.value, 23)
self.assertEqual(ref.value, 23)

12 changes: 9 additions & 3 deletions tests/unit/test_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from tests.integration.test_base import QuickbooksUnitTestCase
import unittest

try:
from mock import patch
Expand All @@ -17,7 +17,7 @@
TEST_REFRESH_TOKEN = 'refresh'


class ClientTest(QuickbooksUnitTestCase):
class ClientTest(unittest.TestCase):
def setUp(self):
super(ClientTest, self).setUp()

Expand All @@ -30,6 +30,13 @@ def setUp(self):

self.auth_client.access_token = 'ACCESS_TOKEN'

self.qb_client = client.QuickBooks(
# auth_client=self.auth_client,
refresh_token='REFRESH_TOKEN',
company_id='COMPANY_ID',
)

self.qb_client.sandbox = True

def tearDown(self):
self.qb_client = client.QuickBooks()
Expand Down Expand Up @@ -161,7 +168,6 @@ def test_make_request(self, process_request):
"GET", url, data={},
headers={'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'python-quickbooks V3 library'}, params={})


def test_handle_exceptions(self):
qb_client = client.QuickBooks()
error_data = {
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/test_mixins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

import os

import unittest
from urllib.parse import quote

Expand All @@ -13,8 +10,6 @@
except ImportError:
from unittest.mock import patch

from quickbooks import client

from quickbooks.objects.base import PhoneNumber, QuickbooksBaseObject
from quickbooks.objects.department import Department
from quickbooks.objects.customer import Customer
Expand Down

0 comments on commit fa75eed

Please sign in to comment.