Commit 5b25c45c authored by Romain Courteaud's avatar Romain Courteaud

slapos_wechat: payment transaction ID is used as mapping

parent 5d94d3c1
......@@ -122,8 +122,13 @@ class TestSlapOSPaymentTransaction_generateWechatId(SlapOSTestCaseMixinWithAbort
mapping = integration_site.getCategoryFromMapping(
'Causality/%s' % transaction_url)
self.assertEqual(mapping, "%s-%s" % (
transaction_date.asdatetime().strftime('%Y%m%d'), wechat_id.split('-')[1]))
self.assertEqual(mapping, payment_transaction.getId())
self.assertTrue(mapping.startswith(
'%s.' % transaction_date.asdatetime().strftime('%Y%m%d')
))
self.assertTrue(mapping.endswith(
'-%s' % wechat_id.split('-')[1]
))
category = integration_site.getMappingFromCategory('causality/%s' % mapping)
# XXX Not indexed yet
# self.assertEqual(category, 'Causality/%s' % transaction_url)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment