Closed Abuelodelanada closed 2 years ago
This PR fixes #16
Fix a typo in the regex that validates UUID
The change is simple:
@@ -128,7 +128,7 @@ class JujuTopology: def is_valid_uuid(self, uuid): """Validates the supplied UUID against the Juju Model UUID pattern.""" regex = re.compile( - "^[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}$" + "^[a-f0-9]{8}-?[a-f0-9]{4}-?[a-f0-9]{4}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}$" ) return bool(regex.match(uuid))
Run unit test. We added a new one: test_invalid_uuid
test_invalid_uuid
Fix typo in the regular expression that validates UUID in the method is_valid_uuid
is_valid_uuid
Issue
This PR fixes #16
Solution
Fix a typo in the regex that validates UUID
Context
The change is simple:
Testing Instructions
Run unit test. We added a new one:
test_invalid_uuid
Release Notes
Fix typo in the regular expression that validates UUID in the method
is_valid_uuid