octodns-netbox-dns/tests/test_make_absolute.py
Ivan Schaller 408cf3fdd2
All checks were successful
check code / check-code (push) Successful in 32s
rename class and add new tests
2024-02-28 16:07:32 +01:00

28 lines
553 B
Python

from octodns_netbox_dns import NetBoxDNSProvider
DEFAULT_CONFIG = {
"id": 1,
"url": "https://localhost:8000",
"token": "",
"view": False,
"replace_duplicates": False,
"make_absolute": True,
}
def test1():
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG)
rcd = "example.com"
absolute = nbdns._make_absolute(rcd)
assert absolute == "example.com."
def test2():
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG)
rcd = "example.com."
absolute = nbdns._make_absolute(rcd)
assert absolute == "example.com."