diff --git a/src/generator/AutoRest.Python.Tests/AcceptanceTests/validation_tests.py b/src/generator/AutoRest.Python.Tests/AcceptanceTests/validation_tests.py index cf210616d7..fb333e4b7c 100644 --- a/src/generator/AutoRest.Python.Tests/AcceptanceTests/validation_tests.py +++ b/src/generator/AutoRest.Python.Tests/AcceptanceTests/validation_tests.py @@ -111,14 +111,14 @@ def test_validation(self): client.validation_of_body("123", 150, tempproduct) except ValidationError as err: self.assertEqual(err.rule, "minimum_ex") - self.assertEqual(err.target, "capacity") + self.assertIn("capacity", err.target) try: tempproduct=Product(child=ChildProduct(), capacity=100) client.validation_of_body("123", 150, tempproduct) except ValidationError as err: self.assertEqual(err.rule, "maximum_ex") - self.assertEqual(err.target, "capacity") + self.assertIn("capacity", err.target) try: tempproduct=Product(child=ChildProduct(), @@ -126,7 +126,7 @@ def test_validation(self): client.validation_of_body("123", 150, tempproduct) except ValidationError as err: self.assertEqual(err.rule, "max_items") - self.assertEqual(err.target, "display_names") + self.assertIn("display_names", err.target) client2 = AutoRestValidationTest( "abc123",