def test_should_return_error_given_empty_values(self):
        product = Product(quote_id=1,
                          name="",
                          material="",
                          acabado="",
                          cristal="")
        product_validation = ProductValidation(product)
        error = product_validation.check_for_empty_values()

        self.assertNotEqual(error, None)
    def test_should_return_error_given_invalid_unit_price(self):
        product = Product(quote_id=1,
                          name="Test",
                          material="Material",
                          acabado="Acabado",
                          cristal="Cristal",
                          unit_price="invalid unit_price")
        product_validation = ProductValidation(product)
        error = product_validation.validate_unit_price()

        self.assertNotEqual(error, None)
    def test_should_not_return_error_given_repeated_values(self):
        product = Product(quote_id=1,
                          name="Test",
                          material="Material",
                          acabado="Acabado",
                          cristal="Cristal")
        product.add()
        product_validation = ProductValidation(product)
        error = product_validation.validate()

        self.assertEqual(error, None)
    def test_should_not_return_error_given_valid_product(self):
        product = Product(quote_id=1,
                          name="Test",
                          material="Material",
                          acabado="Acabado",
                          cristal="Cristal",
                          unit_price=10,
                          cantidad=1)
        product_validation = ProductValidation(product)
        error = product_validation.validate()

        self.assertEqual(error, None)