def test_3_should_be_minus(self): captcha = Captcha(self.DUMMY_PATTERN, self.DUMMY_LEFT, 3, self.DUMMY_RIGHT) self.assertEqual('-', captcha.operator())
def test_2_should_be_multiply(self): captcha = Captcha(self.DUMMY_PATTERN, self.DUMMY_LEFT, 2, self.DUMMY_RIGHT) self.assertEqual('*', captcha.operator())
def test_1_should_be_plus(self): captcha = Captcha(self.DUMMY_PATTERN, self.DUMMY_LEFT, 1, self.DUMMY_RIGHT) self.assertEqual('+', captcha.operator())
def test_1_should_be_1(self): captcha = Captcha(self.DUMMY_PATTERN, self.DUMMY_LEFT, self.DUMMY_OPERATOR, 1) self.assertEqual('one', captcha.right_operand())
def test_1_should_be_one(self): captcha = Captcha(self.DUMMY_PATTERN, 1, self.DUMMY_OPERATOR, self.DUMMY_RIGHT) self.assertEqual('one', captcha.left_operand())
def test_2_should_be_2(self): captcha = Captcha(self.DUMMY_PATTERN, 2, self.DUMMY_OPERATOR, self.DUMMY_RIGHT) self.assertEqual('2', captcha.left_operand()) return False;