diff --git a/src/conftest.py b/src/conftest.py index 860fcdb..d22b1ed 100644 --- a/src/conftest.py +++ b/src/conftest.py @@ -175,7 +175,7 @@ def mock_pdns_get_zones(mocker): rval = [ 'example.com.', 'example.org.', - ] + [f'example{i}.org' for i in range(500)] + ] + [f'example{i}.org' for i in range(500)] + ['localhost.'] return mocker.patch('dino.pdns_api.pdns.get_zones', return_value=rval) diff --git a/src/dino/zoneeditor/views.py b/src/dino/zoneeditor/views.py index 80adc24..d16b87f 100644 --- a/src/dino/zoneeditor/views.py +++ b/src/dino/zoneeditor/views.py @@ -78,7 +78,7 @@ class ZoneNameValidator(RegexValidator): hostname_re = r'[_a-z' + URLValidator.ul + r'0-9](?:[a-z' + URLValidator.ul + r'0-9-]{0,61}[a-z' + URLValidator.ul + r'0-9])?' # identical to URLValidator.domain_re, except for leading underscroes domain_re = r'(?:\.(?!-)[_a-z' + URLValidator.ul + r'0-9-]{1,63}(?