octodns-netbox-dns/tests/test_make_absolute.py

28 lines
553 B
Python
Raw Normal View History

2024-02-28 16:07:32 +01:00
from octodns_netbox_dns import NetBoxDNSProvider
2024-02-21 14:59:19 +01:00
DEFAULT_CONFIG = {
"id": 1,
"url": "https://localhost:8000",
"token": "",
"view": False,
"replace_duplicates": False,
"make_absolute": True,
}
2024-02-28 16:07:32 +01:00
def test1():
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG)
2024-02-21 14:59:19 +01:00
rcd = "example.com"
absolute = nbdns._make_absolute(rcd)
assert absolute == "example.com."
2024-02-28 16:07:32 +01:00
def test2():
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG)
2024-02-21 14:59:19 +01:00
rcd = "example.com."
absolute = nbdns._make_absolute(rcd)
assert absolute == "example.com."