aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/test_gsxws.py12
1 files changed, 12 insertions, 0 deletions
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)