コード例 #1
0
ファイル: qr.py プロジェクト: pitomba/shareit-api
 def _return_base64(self, msg):
     with open(qrwrapper.get_new_qrcode_path(msg), 'r') as img:
         coded = base64.b64encode(img.read())
         self.write(coded)
コード例 #2
0
ファイル: tests.py プロジェクト: pitomba/shareit-api
 def test_image_creation(self):
     TEST_STRING = "shareit msg"
     qr_path = qrwrapper.get_new_qrcode_path(TEST_STRING)
     self.assertNotEqual(qr_path, None)
コード例 #3
0
ファイル: qr.py プロジェクト: pitomba/shareit-api
 def _return_raw_file(self, msg):
     with open(qrwrapper.get_new_qrcode_path(msg), 'r') as img:
         self.write(img.read())
コード例 #4
0
ファイル: tornado_tests.py プロジェクト: pitomba/shareit-api
 def test_image_creation(self):
     test_string = 'shareit msg'
     qr_path = qrwrapper.get_new_qrcode_path(test_string)
     self.assertNotEqual(qr_path, None)