Merge branch 'master' into develop
This commit is contained in:
commit
5ab851e84f
2 changed files with 21 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
__pycache__/
|
20
src/test_ddns_update.py
Normal file
20
src/test_ddns_update.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import unittest
|
||||
from .ddns_update import response_successful
|
||||
|
||||
class TestDdnsUpdate(unittest.TestCase):
|
||||
|
||||
def test_response_successful(self):
|
||||
self.assertTrue(response_successful("good"))
|
||||
self.assertTrue(response_successful("good 1.2.3.4"))
|
||||
self.assertTrue(response_successful("good abcd:abcd:abcd:abcd:abcd:abcd:abcd:abcd"))
|
||||
self.assertTrue(response_successful("nochg"))
|
||||
self.assertTrue(response_successful("nochg 1.2.3.4"))
|
||||
self.assertTrue(response_successful("nochg abcd:abcd:abcd:abcd:abcd:abcd:abcd:abcd"))
|
||||
self.assertFalse(response_successful("notfqdn"))
|
||||
self.assertFalse(response_successful("nohost"))
|
||||
self.assertFalse(response_successful("numhost"))
|
||||
self.assertFalse(response_successful("abuse"))
|
||||
self.assertFalse(response_successful("badagent"))
|
||||
self.assertFalse(response_successful("dnserr"))
|
||||
self.assertFalse(response_successful("911"))
|
||||
|
Loading…
Reference in a new issue