From 5d5a8eae87bc7249ab01a63fadfd87f5e0739fe0 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 21 Mar 2016 17:59:36 +0200 Subject: Fixed comms --- tests/test_gsxws.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py index cff04d9..164c90c 100644 --- a/tests/test_gsxws.py +++ b/tests/test_gsxws.py @@ -21,10 +21,26 @@ def empty(a): class CommsTestCase(TestCase): def setUp(self): from gsxws.core import connect + self.priority = 'HIGH' + self.article_id = 'SN3133' connect(os.getenv('GSX_USER'), os.getenv('GSX_SOLDTO'), os.getenv('GSX_ENV')) + self.articles = comms.fetch(priority=self.priority, readStatus=False) - def test_fetch(self): - comms.fetch() + def test_priority(self): + for a in self.articles: + self.assertEqual(a.priority, self.priority) + + def test_date(self): + for a in self.articles: + self.assertIsInstance(a.createdDate, date) + + def test_content(self): + content = comms.content(self.article_id) + self.assertEqual(content.languageCode, 'en') + + def test_ack(self): + result = comms.ack(self.article_id, 'UNREAD') + self.assertEqual(result.acknowledgeType, 'UNREAD') class RemoteTestCase(TestCase): -- cgit v1.2.3