Fix test failures.
Some checks failed
ci/woodpecker/push/package-deploy Pipeline was successful
ci/woodpecker/tag/package-deploy Pipeline failed

This commit is contained in:
minecraftchest1@outlook.com 2025-01-26 13:31:10 -06:00
parent cca682b43d
commit baa71e4104

View file

@ -195,18 +195,18 @@ class SRV(Record):
self.data = f"{self.priority} {self.weight} {self.port} {self.target}" self.data = f"{self.priority} {self.weight} {self.port} {self.target}"
#@dataclass @dataclass
class Zone: class Zone:
"""Represents a DNS zone containing multiple records.""" """Represents a DNS zone containing multiple records."""
origin: str origin: str = 'example.com'
records:list = [] records: list = field(default_factory=list)
def __init__(self, origin: str): def __post_init__(self):
"""Initializes a zone with the given origin and ensures it ends with a dot.""" """Initializes a zone with the given origin and ensures it ends with a dot."""
if origin[-1] != '.': if self.origin[-1] != '.':
self.origin = origin + '.' self.origin = self.origin + '.'
else:
self.origin = origin #self.records: list = field(default_factory=list)
def __str__(self): def __str__(self):
"""Returns a string representation of the zone.""" """Returns a string representation of the zone."""