summaryrefslogtreecommitdiff
path: root/tests/unittests/sources/azure/test_errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/sources/azure/test_errors.py')
-rw-r--r--tests/unittests/sources/azure/test_errors.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unittests/sources/azure/test_errors.py b/tests/unittests/sources/azure/test_errors.py
index d2213613..e9d3e039 100644
--- a/tests/unittests/sources/azure/test_errors.py
+++ b/tests/unittests/sources/azure/test_errors.py
@@ -119,6 +119,21 @@ def test_reportable_errors(
assert error.as_encoded_report() == "|".join(data)
+def test_dhcp_lease():
+ error = errors.ReportableErrorDhcpLease(duration=5.6, interface="foo")
+
+ assert error.reason == "failure to obtain DHCP lease"
+ assert error.supporting_data["duration"] == 5.6
+ assert error.supporting_data["interface"] == "foo"
+
+
+def test_dhcp_interface_not_found():
+ error = errors.ReportableErrorDhcpInterfaceNotFound(duration=5.6)
+
+ assert error.reason == "failure to find DHCP interface"
+ assert error.supporting_data["duration"] == 5.6
+
+
def test_unhandled_exception():
source_error = None
try: