diff options
author | Filipp Lepalaan <filipp@mac.com> | 2014-03-23 15:38:23 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2014-03-23 15:38:23 +0200 |
commit | 88fba7a73ce08388b6fbc53ec8cc4266404d26ad (patch) | |
tree | 21c4246386f51833ffc6b8b17e1db809afc1f809 | |
parent | ea0019eec66ef3f896410afaedd514bb8c3eace3 (diff) | |
download | py-gsxws-88fba7a73ce08388b6fbc53ec8cc4266404d26ad.tar.gz py-gsxws-88fba7a73ce08388b6fbc53ec8cc4266404d26ad.tar.bz2 py-gsxws-88fba7a73ce08388b6fbc53ec8cc4266404d26ad.zip |
Added Context class and tests
-rw-r--r-- | gsxws/escalations.py | 7 | ||||
-rw-r--r-- | tests/test_gsxws.py | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gsxws/escalations.py b/gsxws/escalations.py index a60e2f4..1ad2706 100644 --- a/gsxws/escalations.py +++ b/gsxws/escalations.py @@ -88,3 +88,10 @@ class Escalation(GsxObject): def get_notes(self): return self.objects.escalationNotes.iterchildren() + +class Context(GsxObject): + def __init__(self, ctype, cid): + super(Context, self).__init__() + self.contextType = ctype + self.contextID = cid + diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index 57b83ab..b400639 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -85,13 +85,15 @@ class TestLookupFunctions(RemoteTestCase): class TestEscalationFunctions(RemoteTestCase): - @skip("Skip") def setUp(self): super(TestEscalationFunctions, self).setUp() esc = escalations.Escalation() esc.shipTo = env['GSX_SHIPTO'] esc.issueTypeCode = 'WS' esc.notes = 'This is a test' + c1 = escalations.Context(1, 'DGKFL06JDHJP') + c2 = escalations.Context(12, '2404776') + esc.escalationContext = [c1, c2] self.escalation = esc.create() def test_create_general_escalation(self): @@ -104,6 +106,7 @@ class TestEscalationFunctions(RemoteTestCase): result = esc.update() self.assertEqual(result.updateStatus, 'SUCCESS') + @skip("Skip") def test_attach_general_escalation(self): esc = escalations.Escalation() esc.escalationId = self.escalation.escalationId |