aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-09-06 18:30:54 +0300
committerFilipp Lepalaan <f@230.to>2013-09-06 18:30:54 +0300
commit3f2fc53c57606a110162eccc2409f5bcc1172af0 (patch)
tree81306cfe0b028f49c0852742626da38fd83797d6 /tests/test_gsxws.py
parentd3fc9cb6dfc89ea118038a5868b99e459cab911b (diff)
downloadpy-gsxws-3f2fc53c57606a110162eccc2409f5bcc1172af0.tar.gz
py-gsxws-3f2fc53c57606a110162eccc2409f5bcc1172af0.tar.bz2
py-gsxws-3f2fc53c57606a110162eccc2409f5bcc1172af0.zip
Added more coverage details to Product
Diffstat (limited to 'tests/test_gsxws.py')
-rw-r--r--tests/test_gsxws.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py
index ee1d943..467a573 100644
--- a/tests/test_gsxws.py
+++ b/tests/test_gsxws.py
@@ -6,6 +6,7 @@ from datetime import date
from unittest import main, skip, TestCase
from gsxws.objectify import parse
+from gsxws.products import Product
from gsxws import repairs, escalations
@@ -95,6 +96,25 @@ class TestWarrantyFunctions(TestCase):
self.assertTrue(self.data.partCovered)
+class TestOnsiteCoverage(TestCase):
+ def setUp(self):
+ from gsxws.core import connect
+ logging.basicConfig(level=logging.DEBUG)
+ env = os.environ
+ connect(env['GSX_USER'], env['GSX_PASSWORD'], env['GSX_SOLDTO'], env['GSX_ENV'])
+ self.product = Product('XXXXXXXXXXX')
+ self.product.warranty()
+
+ def test_has_onsite(self):
+ self.assertTrue(self.product.has_onsite)
+
+ def test_coverage(self):
+ self.assertTrue(self.product.parts_and_labor_covered)
+
+ def test_is_vintage(self):
+ self.assertFalse(self.product.is_vintage)
+
+
class TestActivation(TestCase):
def setUp(self):
self.data = parse('tests/fixtures/ios_activation.xml',
@@ -107,7 +127,6 @@ class TestActivation(TestCase):
self.assertIs(type(self.data.unlocked), bool)
self.assertTrue(self.data.unlocked)
- from gsxws.products import Product
p = Product()
self.assertTrue(p.is_unlocked(self.data))