MCPcopy Index your code
hub / github.com/lincolnloop/python-qrcode / test_qrcode_factory

Function test_qrcode_factory

qrcode/tests/test_qrcode.py:130–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128
129
130def test_qrcode_factory():
131 class MockFactory(BaseImage):
132 drawrect = mock.Mock()
133 new_image = mock.Mock()
134
135 qr = qrcode.QRCode(image_factory=MockFactory)
136 qr.add_data(UNICODE_TEXT)
137 qr.make_image()
138 assert MockFactory.new_image.called
139 assert MockFactory.drawrect.called
140
141
142def test_optimize():

Callers

nothing calls this directly

Calls 2

add_dataMethod · 0.95
make_imageMethod · 0.95

Tested by

no test coverage detected