def set(self, facet, value):
"""Set values."""
+ if facet in ["loglevel"]:
+ value = int(value)
if not self.has_facet(facet) or not self.get(facet) == value:
if self.old_style:
if self.key not in self.origin.data:
"[0-9]+\. The matching lines\r\nfrom [0-9]+ to [0-9]+ are:", ""),
)
+test_custom_loglevel = (
+ (2, "> ", "set account:admin loglevel 2"),
+ (2, "You have successfully .*> ", "show log"),
+ (2, "There are [0-9]+ log lines in memory and [0-9]+ at or above level "
+ "[0-9]+\. The matching lines\r\nfrom [0-9]+ to [0-9]+ are:", ""),
+)
+
test_log_no_errors = (
(2, "> ", "show log 7"),
(2, "None of the [0-9]+ lines in memory matches your request\.", ""),
(test_admin_help, "admin help"),
(test_show_element, "show element"),
(test_show_log, "show log"),
+ (test_custom_loglevel, "show log"),
(test_log_no_errors, "no errors logged"),
)