def test_multiply_numbers(self):

        answer = app.multiply(12, 12)
        self.assertEqual(answer, 144)
Пример #2
0
 def test_multiply(self):
     self.assertEqual(app.multiply(self.x, self.y), 50)
     self.assertEqual(app.multiply(2, 3), 6)
Пример #3
0
def test_multiply():
    assert 36 == multiply(6,6)
Пример #4
0
 def testCalculation(self):
     self.assertEqual(app.plus(3, 2), 5)
     self.assertEqual(app.minus(3, 2), 1)
     self.assertEqual(app.multiply(3, 2), 6)
     self.assertEqual(app.div(4, 2), 2)
Пример #5
0
 def test_multiply(self):
     self.assertEqual(calculations.multiply(1,2), 2)
     self.assertEqual(calculations.multiply(2,1), 2)
     self.assertEqual(calculations.multiply(1,0), 0)
     self.assertEqual(calculations.multiply(1,-4), -4)
     self.assertEqual(calculations.multiply(-1,-5), 5)
Пример #6
0
 def test_multiply(self):
     self.assertEqual(app.multiply(10, 5), 50)
     self.assertEqual(app.multiply(-1, 1), -1)
     self.assertEqual(app.multiply(-1, -1), 1)
Пример #7
0
 def test_multiplication(self):
     assert 100 == app.multiply(10, 10)
Пример #8
0
 def test_multiply_type_error(self, mock_get):
     with self.env:
         from app import multiply, TYPE_ERROR_MESSAGE
         res = multiply("2", "3")
         self.assertDictEqual(
             res, {'error': TYPE_ERROR_MESSAGE.format("2", "3")})
Пример #9
0
 def test_multiply(self, mock_get):
     with self.env:
         from app import multiply
         res = multiply(2, 3)
         self.assertDictEqual(res, {'result': 6})