| Conditions | 1 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 20 | def test_calculate_signature_hmac(self): |
||
| 21 | from wechatpy.pay import calculate_signature_hmac |
||
| 22 | |||
| 23 | api_key = '192006250b4c09247ec02edce69f6a2d' |
||
| 24 | params = { |
||
| 25 | 'test1': 'test1', |
||
| 26 | 'test2': 'test2', |
||
| 27 | } |
||
| 28 | expected = 'EDAC6D70D2FDF5A2382F8204FC96A1918017E46ACC5297F565ED1A7610ACF659' |
||
| 29 | sign = calculate_signature_hmac(params, api_key) |
||
| 30 | self.assertEqual(expected, sign) |
||
| 31 | |||
| 47 |