aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-10-07 11:57:17 +0300
committerFilipp Lepalaan <f@230.to>2013-10-07 11:57:17 +0300
commit7cec1e997840b2b3b2decab789c5f0f4a2fe23e5 (patch)
tree9fb5e7736d23e2dbe972512ed2497de6c309b58e /tests
parent86a6df80b0e40855097fcf836cf11bd4808882f6 (diff)
downloadpy-gsxws-7cec1e997840b2b3b2decab789c5f0f4a2fe23e5.tar.gz
py-gsxws-7cec1e997840b2b3b2decab789c5f0f4a2fe23e5.tar.bz2
py-gsxws-7cec1e997840b2b3b2decab789c5f0f4a2fe23e5.zip
Added Component Check to lookups.py
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gsxws.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py
index 59c0662..952c6fc 100644
--- a/tests/test_gsxws.py
+++ b/tests/test_gsxws.py
@@ -8,13 +8,12 @@ from unittest import main, skip, TestCase
from gsxws.objectify import parse
from gsxws.products import Product
-from gsxws import repairs, escalations, GsxError
+from gsxws import repairs, escalations, lookups, GsxError
class RemoteTestCase(TestCase):
def setUp(self):
from gsxws.core import connect
- logging.basicConfig(level=logging.DEBUG)
connect(env['GSX_USER'],
env['GSX_PASSWORD'],
env['GSX_SOLDTO'],
@@ -29,10 +28,20 @@ class TestErrorFunctions(TestCase):
def test_code(self):
self.assertEqual(self.data.errors['RPR.ONS.025'],
'This unit is not eligible for an Onsite repair from GSX.')
+
def test_message(self):
self.assertRegexpMatches(self.data.message, 'Multiple error messages exist.')
+class TestLookupFunctions(RemoteTestCase):
+ def test_component_check(self):
+ l = lookups.Lookup(serialNumber=env['GSX_SN'])
+ l.repairStrategy = "CA"
+ l.shipTo = env['GSX_SHIPTO']
+ r = l.component_check()
+ self.assertFalse(r.eligibility)
+
+
class TestEscalationFunctions(RemoteTestCase):
@skip("Skip")
def setUp(self):
@@ -67,12 +76,9 @@ class TestEscalationFunctions(RemoteTestCase):
self.assertEqual(result.escalationType, 'GSX Help')
-class TestRepairFunctions(TestCase):
+class TestRepairFunctions(RemoteTestCase):
@skip("Skip")
def test_whole_unit_exchange(self):
- from gsxws.core import connect
- logging.basicConfig(level=logging.DEBUG)
- connect('', '', '', 'it')
rep = repairs.WholeUnitExchange()
rep.serialNumber = ''
rep.unitReceivedDate = '08/12/2013'
@@ -220,4 +226,5 @@ class TestCarryinRepairDetail(TestCase):
if __name__ == '__main__':
+ logging.basicConfig(level=logging.DEBUG)
main()