aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-12-10 10:42:21 +0200
committerFilipp Lepalaan <f@230.to>2013-12-10 10:42:21 +0200
commitd343b0125b187966c0c52ecd3b9ab6a03f6cac21 (patch)
tree80c4fa8a1c61702002bc0d6a6abc188f05eda84d /tests/test_gsxws.py
parentef5a2503979100537d92a558a173f5ec32716988 (diff)
downloadpy-gsxws-d343b0125b187966c0c52ecd3b9ab6a03f6cac21.tar.gz
py-gsxws-d343b0125b187966c0c52ecd3b9ab6a03f6cac21.tar.bz2
py-gsxws-d343b0125b187966c0c52ecd3b9ab6a03f6cac21.zip
Added test_product_type()
Diffstat (limited to 'tests/test_gsxws.py')
-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)