From 774c8ed94e07f75fe38d5067dfea9b19bb32e77d Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 13 Aug 2013 10:49:28 +0300 Subject: Added WholeUnitExchange --- tests/test_gsxws.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'tests/test_gsxws.py') diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index 6982542..c24217c 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -1,11 +1,43 @@ # -*- coding: utf-8 -*- +import logging from datetime import date -from unittest import main, TestCase +from unittest import main, skip, TestCase +from gsxws import repairs from gsxws.objectify import parse +class TestRepairFunctions(TestCase): + @skip("Skip") + def test_whole_unit_exchange(self): + from gsxws.core import connect + logging.basicConfig(level=logging.DEBUG) + connect('', '', '', 'it') + rep = repairs.WholeUnitExchange() + rep.serialNumber = '' + rep.unitReceivedDate = '08/12/2013' + rep.unitReceivedTime = '11:00 am' + rep.shipTo = '677592' + rep.poNumber = '677592' + rep.symptom = 'test' + rep.diagnosis = 'test' + customer = repairs.Customer(emailAddress='test@example.com') + customer.firstName = 'First Name' + customer.lastName = 'Last Name' + customer.addressLine1 = 'Address Line 1' + customer.primaryPhone = '0123456789' + customer.city = 'Test' + customer.zipCode = '12345' + customer.state = 'Test' + customer.country = 'US' + rep.customerAddress = customer + part = repairs.RepairOrderLine() + part.partNumber = '661-5571' + rep.orderLines = [part] + rep.create() + + class TestWarrantyFunctions(TestCase): def setUp(self): self.data = parse('tests/fixtures/warranty_status.xml', 'warrantyDetailInfo') @@ -76,5 +108,6 @@ class TestOnsiteDispatchDetail(TestCase): def test_orderlines(self): self.assertIsInstance(self.data.dispatchOrderLines.isSerialized, bool) + if __name__ == '__main__': main() -- cgit v1.2.3