We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e3258c commit 8a5a770Copy full SHA for 8a5a770
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests/APIModelsDNSResolverSettingsTestCase.inc
@@ -74,4 +74,14 @@ class APIModelsDNSResolverSettingsTestCase extends TestCase {
74
$unbound_config = file_get_contents('/var/unbound/unbound.conf');
75
$this->assert_str_contains($unbound_config, 'test: test');
76
}
77
+
78
+ /**
79
+ * Checks that the `get_python_script_options` method correctly retrieves the available Python scripts.
80
+ */
81
+ public function test_get_python_script_options(): void {
82
+ # Add a mock script to /var/unbound/ to populate an option
83
+ touch('/var/unbound/test_option1.py');
84
+ $settings = new DNSResolverSettings(async: false);
85
+ $this->assert_equals($settings->get_python_script_options(), ['test_option1']);
86
+ }
87
0 commit comments