@@ -0,0 +1,1266 @@
+# -*- coding: utf-8 -*-%0A%22%22%22Test hmac utility functions%22%22%22%0A%0Aimport unittest%0Aimport mock%0A%0Afrom utility.hmac import data_hmac%0Afrom utility.hmac import url_for_hmac%0Afrom utility.hmac import hmac_creation%0A%0A%0Aclass TestHmacUtil(unittest.TestCase):%0A    %22%22%22Test Utility method for hmac creation%22%22%22%0A%0A    def test_hmac_creation(self):%0A        %22%22%22Test hmac creation with a utf-8 string%22%22%22%0A        self.assertEqual(hmac_creation(%22%E3%83%95%E3%82%A1%E3%82%A4%22), %2221fa1d935bbbb07a7875%22)%0A%0A    def test_data_hmac(self):%0A        %22%22%22Test data_hmac fn with a utf-8 string%22%22%22%0A        self.assertEqual(data_hmac(%22%E3%83%95%E3%82%A1%E3%82%A4%22), %22%E3%83%95%E3%82%A1%E3%82%A4:21fa1d935bbbb07a7875%22)%0A%0A    @mock.patch(%22utility.hmac.url_for%22)%0A    def test_url_for_hmac_with_plain_url(self, mock_url):%0A        %22%22%22Test url_for_hmac without params%22%22%22%0A        mock_url.return_value = %22https://mock_url.com/%E3%83%95%E3%82%A1%E3%82%A4/%22%0A        self.assertEqual(url_for_hmac(%22%E3%83%95%E3%82%A1%E3%82%A4%22),%0A                         %22https://mock_url.com/%E3%83%95%E3%82%A1%E3%82%A4/?hm=a62896a50d9ffcff7deb%22)%0A%0A    @mock.patch(%22utility.hmac.url_for%22)%0A    def test_url_for_hmac_with_param_in_url(self, mock_url):%0A        %22%22%22Test url_for_hmac with params%22%22%22%0A        mock_url.return_value = %22https://mock_url.com/?%E3%83%95%E3%82%A1%E3%82%A4=1%22%0A        self.assertEqual(url_for_hmac(%22%E3%83%95%E3%82%A1%E3%82%A4%22),%0A                         %22https://mock_url.com/?%E3%83%95%E3%82%A1%E3%82%A4=1&hm=b2128fb28bc32da3b5b7%22)%0A

Add tests for hmac utility