forked from jcollie/octodns-netbox-dns
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e624a7
commit f38a103
Showing
2 changed files
with
8 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,26 +13,26 @@ | |
|
||
def test_escape1(): | ||
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG) | ||
rcd_value = r"v=TLSRPTv1\\; rua=mailto:[email protected]" | ||
rcd_value = r"v=TLSRPTv1; rua=mailto:[email protected]" | ||
value = nbdns._fix_semicolon(rcd_value, escape=True) | ||
|
||
assert value == r"v=TLSRPTv1\; rua=mailto:[email protected]" | ||
|
||
|
||
def test_escape2(): | ||
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG) | ||
rcd_value = r"v=TLSRPTv1; rua=mailto:[email protected]" | ||
rcd_value = r"v=TLSRPTv1\; rua=mailto:[email protected]" | ||
value = nbdns._fix_semicolon(rcd_value, escape=True) | ||
|
||
assert value == r"v=TLSRPTv1\; rua=mailto:[email protected]" | ||
assert value == r"v=TLSRPTv1\\; rua=mailto:[email protected]" | ||
|
||
|
||
def test_escape3(): | ||
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG) | ||
rcd_value = r"t=y\;o=~\;" | ||
value = nbdns._fix_semicolon(rcd_value, escape=True) | ||
|
||
assert value == r"t=y\;o=~\;" | ||
assert value == r"t=y\\;o=~\\;" | ||
|
||
|
||
def test_escape4(): | ||
|
@@ -56,15 +56,15 @@ def test_unescape2(): | |
rcd_value = r"v=TLSRPTv1\\; rua=mailto:[email protected]" | ||
value = nbdns._fix_semicolon(rcd_value, escape=False) | ||
|
||
assert value == r"v=TLSRPTv1; rua=mailto:[email protected]" | ||
assert value == r"v=TLSRPTv1\; rua=mailto:[email protected]" | ||
|
||
|
||
def test_unescape3(): | ||
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG) | ||
rcd_value = r"t=y\\;o=~\;" | ||
value = nbdns._fix_semicolon(rcd_value, escape=False) | ||
|
||
assert value == r"t=y;o=~;" | ||
assert value == r"t=y\;o=~;" | ||
|
||
|
||
def test_unescape4(): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ def test_txt2(): | |
rcd_value = r"v=TLSRPTv1\; rua=mailto:[email protected]" | ||
value = nbdns._format_rdata(rcd_type, rcd_value) | ||
|
||
assert value == r"v=TLSRPTv1\; rua=mailto:[email protected]" | ||
assert value == r"v=TLSRPTv1\\; rua=mailto:[email protected]" | ||
|
||
|
||
def test_txt3(): | ||
|
@@ -77,7 +77,7 @@ def test_txt4(): | |
rcd_value = r"t=y\;o=~\;" | ||
value = nbdns._format_rdata(rcd_type, rcd_value) | ||
|
||
assert value == r"t=y\;o=~\;" | ||
assert value == r"t=y\\;o=~\\;" | ||
|
||
|
||
def test_txt5(): | ||
|
@@ -89,15 +89,6 @@ def test_txt5(): | |
assert value == r"t=y\;o=~\;" | ||
|
||
|
||
def test_txt4(): | ||
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG) | ||
rcd_type = "TXT" | ||
rcd_value = r"v=TLSRPTv1\\; rua=mailto:[email protected]" | ||
value = nbdns._format_rdata(rcd_type, rcd_value) | ||
|
||
assert value == r"v=TLSRPTv1\; rua=mailto:[email protected]" | ||
|
||
|
||
def test_srv(): | ||
nbdns = NetBoxDNSProvider(**DEFAULT_CONFIG) | ||
rcd_type = "SRV" | ||
|