aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-07-16 18:53:41 +0300
committerFilipp Lepalaan <f@230.to>2013-07-16 18:53:41 +0300
commit86af9609f17a8e34004faa991854f62d3361685f (patch)
tree6f678b6ebb7e24cf0760d9747ac84182af230f5e /tests/test_gsxws.py
parent4d9c2b0a47dd9336d9df7222013ade0c1763856d (diff)
downloadpy-gsxws-86af9609f17a8e34004faa991854f62d3361685f.tar.gz
py-gsxws-86af9609f17a8e34004faa991854f62d3361685f.tar.bz2
py-gsxws-86af9609f17a8e34004faa991854f62d3361685f.zip
Reorganized tests
Diffstat (limited to 'tests/test_gsxws.py')
-rw-r--r--tests/test_gsxws.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py
new file mode 100644
index 0000000..d7feac6
--- /dev/null
+++ b/tests/test_gsxws.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+
+import unittest
+from datetime import date
+
+from gsxws.objectify import parse
+
+
+class TestWarrantyFunctions(unittest.TestCase):
+ def setUp(self):
+ self.wty = parse('tests/fixtures/warranty_status.xml', 'warrantyDetailInfo')
+
+ def test_purchase_date(self):
+ self.assertIsInstance(self.wty.estimatedPurchaseDate.pyval, date)
+
+ def test_config_description(self):
+ self.assertEqual(self.wty.configDescription, 'IPHONE 4,16GB BLACK')
+
+
+if __name__ == '__main__':
+ unittest.main()