def _return_base64(self, msg): with open(qrwrapper.get_new_qrcode_path(msg), 'r') as img: coded = base64.b64encode(img.read()) self.write(coded)
def test_image_creation(self): TEST_STRING = "shareit msg" qr_path = qrwrapper.get_new_qrcode_path(TEST_STRING) self.assertNotEqual(qr_path, None)
def _return_raw_file(self, msg): with open(qrwrapper.get_new_qrcode_path(msg), 'r') as img: self.write(img.read())
def test_image_creation(self): test_string = 'shareit msg' qr_path = qrwrapper.get_new_qrcode_path(test_string) self.assertNotEqual(qr_path, None)