From d343b0125b187966c0c52ecd3b9ab6a03f6cac21 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 10 Dec 2013 10:42:21 +0200 Subject: Added test_product_type() --- tests/test_gsxws.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index e59c1ff..1265207 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -137,6 +137,18 @@ class TestWarrantyFunctions(TestCase): self.data = parse('tests/fixtures/warranty_status.xml', 'warrantyDetailInfo') + def test_product_type(self): + product = Product('DGKFL06JDHJP') + product.description='MacBook Pro (17-inch, Mid 2009)' + self.assertTrue(product.is_mac) + product.description='iMac (27-inch, Late 2013)' + self.assertTrue(product.is_mac) + product.description='iPhone 5' + self.assertTrue(product.is_iphone) + product.description = 'iPad 2 3G' + self.assertTrue(product.is_ipad) + self.assertTrue(product.is_ios) + def test_purchase_date(self): self.assertIsInstance(self.data.estimatedPurchaseDate, date) -- cgit v1.2.3