diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-03-21 15:19:34 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-03-21 15:19:34 +0200 |
commit | ba5574f5674138c3332f4220951d8e51d560dc1e (patch) | |
tree | b28651b95370a5282e3c675a898d79c4630c9d04 /tests | |
parent | cc38b441e308b709d6ee118d8f4d5aa50a7d05ed (diff) | |
download | py-gsxws-ba5574f5674138c3332f4220951d8e51d560dc1e.tar.gz py-gsxws-ba5574f5674138c3332f4220951d8e51d560dc1e.tar.bz2 py-gsxws-ba5574f5674138c3332f4220951d8e51d560dc1e.zip |
Adding comms support
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gsxws.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index c4924da..cff04d9 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -10,13 +10,23 @@ from gsxws.core import validate from gsxws.objectify import parse, gsx_diags_timestamp from gsxws.products import Product from gsxws import (repairs, escalations, lookups, returns, - GsxError, ServicePart, diagnostics, comptia,) + GsxError, ServicePart, diagnostics, comptia, + comms,) def empty(a): return a in [None, '', ' '] +class CommsTestCase(TestCase): + def setUp(self): + from gsxws.core import connect + connect(os.getenv('GSX_USER'), os.getenv('GSX_SOLDTO'), os.getenv('GSX_ENV')) + + def test_fetch(self): + comms.fetch() + + class RemoteTestCase(TestCase): def setUp(self): from gsxws.core import connect @@ -177,9 +187,9 @@ class TestErrorFunctions(TestCase): from gsxws.core import GsxResponse xml = open('tests/fixtures/error_ca_fmip.xml', 'r').read() with self.assertRaisesRegexp(GsxError, 'A repair cannot be created'): - GsxResponse(xml=xml, el_method='CreateCarryInResponse', + GsxResponse(xml=xml, el_method='CreateCarryInResponse', el_response='repairConfirmation') - + class TestLookupFunctions(RemoteTestCase): def test_component_check(self): |