aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-08-13 10:49:28 +0300
committerFilipp Lepalaan <f@230.to>2013-08-13 10:49:31 +0300
commit774c8ed94e07f75fe38d5067dfea9b19bb32e77d (patch)
tree72ccaa73df9a6e128b7738be603eededeaf58c21 /tests/test_gsxws.py
parent388a47255e334b083be7058ab16e7fb0084240de (diff)
downloadpy-gsxws-774c8ed94e07f75fe38d5067dfea9b19bb32e77d.tar.gz
py-gsxws-774c8ed94e07f75fe38d5067dfea9b19bb32e77d.tar.bz2
py-gsxws-774c8ed94e07f75fe38d5067dfea9b19bb32e77d.zip
Added WholeUnitExchange
Diffstat (limited to 'tests/test_gsxws.py')
-rw-r--r--tests/test_gsxws.py35
1 files changed, 34 insertions, 1 deletions
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()