From d3fc9cb6dfc89ea118038a5868b99e459cab911b Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 2 Sep 2013 16:11:41 +0300 Subject: Match product line names with those returned by GSX --- gsxws/products.yaml | 4 +- tests/fixtures/repair_details_ca.xml | 81 ++++++++++++++++++++++++++++++++++++ tests/test_gsxws.py | 13 ++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 tests/fixtures/repair_details_ca.xml diff --git a/gsxws/products.yaml b/gsxws/products.yaml index 798b092..d6ab4e4 100644 --- a/gsxws/products.yaml +++ b/gsxws/products.yaml @@ -79,12 +79,12 @@ IPHONE: - "iPhone 4S" - "iPhone 5" -IPHONEACC: +IPHONEACCESSORY: name: iPhone Accessory models: - "Bluetooth Headset" -MACACC: +MACACCESSORY: name: Mac Accessory models: - "AirPort Card" diff --git a/tests/fixtures/repair_details_ca.xml b/tests/fixtures/repair_details_ca.xml new file mode 100644 index 0000000..53c3b28 --- /dev/null +++ b/tests/fixtures/repair_details_ca.xml @@ -0,0 +1,81 @@ + + + + + 2ed251309391636165 + + 2093174681 + 0000033523 + Out Of Warranty (No Coverage) + G2093174681 + 030044147665 + UV45204MS85 + 2011-01-27 11:45:01 PST + Out Of Warranty (No Coverage) + iBook G4 (14-inch Late 2004) + IBOOK 14.1/1.33G/CTO + 321213213 + 2123123 + N + Customer Reported Symptom:sa + Service Provider Diagnosis:asda + Notes:ad + -Address Cosmetic Damage? No + 123456789 + + 155 ca + US + 95014 + Madera + 005 + CUPERTINO + Ääkköset + Tässäkin + 999999999 + + + 076-1157 + Foot Kit, Rubber Feet and Sockets + Out Of Warranty (No Coverage) + Outbound Order Created + ORDC + 2012-04-30 01:26:48 -07:00 + NRET + NRET + 7148187912 + 4 + N + 123456789 + + + 076-1255 + VC,SCREWS,IBOOK MLB, W/NYLOCK + Out Of Warranty (No Coverage) + Outbound Order Created + ORDC + 2012-04-30 05:16:28 -07:00 + NRET + NRET + 7148187912 + 5 + N + 123456789 + + + ACSH08 + SHIPPING CHARGES FOR CARRY-IN ORDER + Outbound Order Created + ORDC + 2012-04-30 18:29:58 -07:00 + 7148187912 + 6 + N + 123456789 + + N + + + + + + diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index 2596f52..ee1d943 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -10,6 +10,7 @@ from gsxws import repairs, escalations class TestEscalationFunctions(TestCase): + @skip("Skip") def setUp(self): from gsxws.core import connect logging.basicConfig(level=logging.DEBUG) @@ -150,5 +151,17 @@ class TestOnsiteDispatchDetail(TestCase): self.assertIsInstance(self.data.dispatchOrderLines.isSerialized, bool) +class TestCarryinRepairDetail(TestCase): + def setUp(self): + self.data = parse('tests/fixtures/repair_details_ca.xml', + 'lookupResponseData') + + def test_details(self): + self.assertEqual(self.data.dispatchId, 'G2093174681') + + def test_unicode_name(self): + self.assertEqual(self.data.primaryAddress.firstName, u'Ääkköset') + + if __name__ == '__main__': main() -- cgit v1.2.3