mirror of
https://github.com/Cronocide/wifipumpkin3.git
synced 2025-01-22 11:18:55 +00:00
22 lines
727 B
Python
22 lines
727 B
Python
import unittest
|
|
from wifipumpkin3.exceptions.errors.dhcpException import DHCPServerSettingsError
|
|
from wifipumpkin3.core.common.platforms import Linux
|
|
|
|
|
|
class TestException(unittest.TestCase):
|
|
def test_dhcp_error_message(self):
|
|
with self.assertRaises(DHCPServerSettingsError):
|
|
raise DHCPServerSettingsError("", "")
|
|
|
|
def test_read_file_exception(self):
|
|
self.result_content = "dhcp test massage"
|
|
self.get_file_content = Linux.readFileExceptions("dhcp_test_message")
|
|
self.assertEqual(self.result_content, self.get_file_content)
|
|
|
|
# def test_raise(self):
|
|
# raise DHCPServerSettingsError('DHCP Server', 'range ip error')
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|