mirror of
https://github.com/Cronocide/wifipumpkin3.git
synced 2025-01-22 19:37:18 +00:00
20 lines
729 B
Python
20 lines
729 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()
|