Commit 3aad5b21 authored by Romain Courteaud's avatar Romain Courteaud

MORE TEST

parent 4dc7faf6
......@@ -3,7 +3,7 @@ from urlchecker_db import LogDB
import peewee
class UrlCheckerNetworkTestCase(unittest.TestCase):
class UrlCheckerDBTestCase(unittest.TestCase):
def setUp(self):
self.db = LogDB(":memory:")
......
import unittest
from urlchecker_db import LogDB
import peewee
from urlchecker_dns import expandDomainList
class UrlCheckerDNSTestCase(unittest.TestCase):
def setUp(self):
self.db = LogDB(":memory:")
self.db.createTables()
################################################
# expandDomainList
################################################
def test_expandDomainList(self):
result = expandDomainList(["c", "b.a.a", "a.a.a", "a.a"])
assert result == ["a.a", "a.a.a", "b.a.a", "c"]
def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(UrlCheckerDNSTestCase))
return suite
if __name__ == "__main__":
unittest.main(defaultTest="suite")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment