diff options
Diffstat (limited to 'tests/test_gsxws.py')
-rw-r--r-- | tests/test_gsxws.py | 21 |
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() |