mirror of
https://github.com/lepture/captcha.git
synced 2026-03-13 09:43:22 +08:00
17 lines
418 B
Python
17 lines
418 B
Python
# coding: utf-8
|
|
|
|
import sys
|
|
|
|
if not hasattr(sys, 'pypy_version_info'):
|
|
from io import BytesIO
|
|
from captcha.image import ImageCaptcha, WheezyCaptcha
|
|
|
|
def test_image_generate():
|
|
captcha = ImageCaptcha()
|
|
data = captcha.generate('1234')
|
|
assert isinstance(data, BytesIO)
|
|
|
|
captcha = WheezyCaptcha()
|
|
data = captcha.generate('1234')
|
|
assert isinstance(data, BytesIO)
|