Commit 8cadbe455dd9d13db7f16e2a26f3b9246b979af6

Authored by Adhidarma Hadiwinoto
1 parent b89af83d86
Exists in master

refactor task['customer'] menjadi task['member']

Showing 1 changed file with 1 additions and 1 deletions Inline Diff

1 import sate24 1 import sate24
2 2
3 def test_parsePullMessage(): 3 def test_parsePullMessage():
4 task = sate24.parsePullMessage('NONE') 4 task = sate24.parsePullMessage('NONE')
5 assert task['status'] == 'NONE' 5 assert task['status'] == 'NONE'
6 6
7 task = sate24.parsePullMessage('OK;181380;181359;20150323155308;02199994004;ADHISIMON;aaa_pull;E5;DKI_JAKARTA;0;;') 7 task = sate24.parsePullMessage('OK;181380;181359;20150323155308;02199994004;ADHISIMON;aaa_pull;E5;DKI_JAKARTA;0;;')
8 assert task['status'] == 'OK' 8 assert task['status'] == 'OK'
9 assert task['requestId'] == '181380' 9 assert task['requestId'] == '181380'
10 assert task['timestamp'] == '20150323155308' 10 assert task['timestamp'] == '20150323155308'
11 assert task['destination'] == '02199994004' 11 assert task['destination'] == '02199994004'
12 assert task['customer'] == 'ADHISIMON' 12 assert task['member'] == 'ADHISIMON'
13 assert task['gateway_type'] == 'aaa_pull' 13 assert task['gateway_type'] == 'aaa_pull'
14 assert task['product'] == 'E5' 14 assert task['product'] == 'E5'
15 assert task['city'] == 'DKI_JAKARTA' 15 assert task['city'] == 'DKI_JAKARTA'
16 16
17 def test_keyByRequestId(): 17 def test_keyByRequestId():
18 assert sate24.keyByRequestId('TEST', '123') == 'TEST.trx.requestId:123' 18 assert sate24.keyByRequestId('TEST', '123') == 'TEST.trx.requestId:123'
19 19
20 def test_keyByNominalDestination(): 20 def test_keyByNominalDestination():
21 assert sate24.keyByNominalDestination('TEST', '5000', '08180818') == 'TEST.trx.nominal:5000.destination:08180818' 21 assert sate24.keyByNominalDestination('TEST', '5000', '08180818') == 'TEST.trx.nominal:5000.destination:08180818'
22 22