class QRCodeTest(unittest.TestCase): text = "foobar" size = 50 def setUp(self): self.qr = QRCode(self.text, self.size) def test_build(self): version, size, img = self.qr.build() self.assertEqual(size, self.size) self.assertTrue(hasattr(img, 'save'))
def setUp(self): self.qr = QRCode(self.text, self.size)