diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-10-20 22:16:55 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-10-20 22:16:55 +0300 |
commit | 20709c67a12fcddaf4a855a630cd35714ebe4021 (patch) | |
tree | 625bb4cea9db448123f8f423b52ab8d403b355eb | |
parent | 65f1bf52be1537cd4b077e0665cb76c462bb013b (diff) | |
download | py-gsxws-20709c67a12fcddaf4a855a630cd35714ebe4021.tar.gz py-gsxws-20709c67a12fcddaf4a855a630cd35714ebe4021.tar.bz2 py-gsxws-20709c67a12fcddaf4a855a630cd35714ebe4021.zip |
Added repair strategies
-rw-r--r-- | gsxws/products.py | 8 | ||||
-rw-r--r-- | tests/test_gsxws.py | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gsxws/products.py b/gsxws/products.py index b268457..281c097 100644 --- a/gsxws/products.py +++ b/gsxws/products.py @@ -98,6 +98,14 @@ class Product(object): self.productDescription = self.warrantyDetails.productDescription self.description = self.productDescription.lstrip('~VIN,') + self.repair_strategies = [] + + try: + for i in self.warrantyDetails.availableRepairStrategies: + self.repair_strategies.append(i.availableRepairStrategy) + except AttributeError: + pass + return self.warrantyDetails def parts(self): diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index ad32fa8..db0c10d 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -348,6 +348,9 @@ class TestRemoteWarrantyFunctions(TestCase): self.product = Product(os.getenv('GSX_SN')) self.wty = self.product.warranty(ship_to=os.getenv('GSX_SHIPTO')) + def test_repair_strategies(self): + self.assertEqual(self.product.repair_strategies[0], 'Carry-in') + def test_acplus_status(self): self.assertTrue(self.wty.acPlusFlag) |