示例#1
0
    def setUp(self):
        self.session_manager = Oauth1SessionManager(
            sandbox=True,
            consumer_key=os.environ.get('CONSUMER_KEY'),
            consumer_secret=os.environ.get('CONSUMER_SECRET'),
            access_token=os.environ.get('ACCESS_TOKEN'),
            access_token_secret=os.environ.get('ACCESS_TOKEN_SECRET'),
        )

        self.qb_client = QuickBooks(session_manager=self.session_manager,
                                    sandbox=True,
                                    company_id=os.environ.get('COMPANY_ID'))
    def setUp(self):
        self.qb_client = QuickBooks(
            sandbox=True,
            consumer_key="update_consumer_key",
            consumer_secret="update_consumer_secret",
            access_token="update_access_token",
            access_token_secret="update_access_token_secret",
            company_id="update_company_id",
            callback_url="update_callback_url")

        self.cdc_json_response = {
            "CDCResponse": [{
                "QueryResponse": [{
                    "Customer": [{
                        "Id": 1,
                        "DisplayName": "TestCustomer",
                        "Job": False,
                        "Balance": 0
                    }],
                    "startPosition":
                    1,
                    "maxResults":
                    1
                }, {
                    "Invoice": [
                        {
                            "DocNumber": "12344",
                            "TxnDate": "2017-01-01",
                            "Line": [{
                                "Id": 1
                            }, {
                                "Id": 2
                            }]
                        },
                        {
                            "DocNumber": "12345",
                            "TxnDate": "2017-01-01",
                            "Line": [{
                                "Id": 1
                            }, {
                                "Id": 2
                            }]
                        },
                    ],
                    "startPosition":
                    1,
                    "maxResults":
                    2
                }]
            }],
            "time":
            "2016-01-01T00:00:00"
        }
示例#3
0
    def setUp(self):
        self.session_manager = Oauth1SessionManager(
            sandbox=True,
            consumer_key=os.environ.get('CONSUMER_KEY'),
            consumer_secret=os.environ.get('CONSUMER_SECRET'),
            access_token=os.environ.get('ACCESS_TOKEN'),
            access_token_secret=os.environ.get('ACCESS_TOKEN_SECRET'),
        )

        self.qb_client = QuickBooks(
            session_manager=self.session_manager,
            sandbox=True,
            company_id=os.environ.get('COMPANY_ID')
        )

        self.name = "Test Department {0}".format(datetime.now().strftime('%d%H%M%S'))
    def setUp(self):
        self.session_manager = Oauth1SessionManager(
            sandbox=True,
            consumer_key=os.environ.get('CONSUMER_KEY'),
            consumer_secret=os.environ.get('CONSUMER_SECRET'),
            access_token=os.environ.get('ACCESS_TOKEN'),
            access_token_secret=os.environ.get('ACCESS_TOKEN_SECRET'),
        )

        self.qb_client = QuickBooks(session_manager=self.session_manager,
                                    sandbox=True,
                                    company_id=os.environ.get('COMPANY_ID'))

        self.title = "Mr"
        self.given_name = "James"
        self.middle_name = "B"
        self.family_name = "King"
        self.suffix = "Jr"
        self.fully_qualified_name = datetime.now().strftime('%d%H%M%S')
        self.company_name = datetime.now().strftime('%d%H%M%S')
        self.display_name = datetime.now().strftime('%d%H%M%S')
    def test_valid_object_name(self):
        obj = TaxCode()
        client = QuickBooks()
        result = client.isvalid_object_name(obj.qbo_object_name)

        self.assertTrue(result)
示例#6
0
    def test_valid_object_name(self):
        attachable = Attachable()
        client = QuickBooks()
        result = client.isvalid_object_name(attachable.qbo_object_name)

        self.assertTrue(result)
示例#7
0
    def test_valid_object_name(self):
        obj = RefundReceipt()
        client = QuickBooks()
        result = client.isvalid_object_name(obj.qbo_object_name)

        self.assertTrue(result)
示例#8
0
    def test_valid_object_name(self):
        obj = PurchaseOrder()
        client = QuickBooks()
        result = client.isvalid_object_name(obj.qbo_object_name)

        self.assertTrue(result)
示例#9
0
    def test_valid_object_name(self):
        account = Account()
        client = QuickBooks()
        result = client.isvalid_object_name(account.qbo_object_name)

        self.assertTrue(result)