diff options
author | Camil Staps | 2016-04-14 20:07:12 +0200 |
---|---|---|
committer | Camil Staps | 2016-04-14 20:07:12 +0200 |
commit | 872e11deb29e87eddcfaca76d555acc16e329653 (patch) | |
tree | 00aa2aec0b5a4e6874d6de7c0f9a6bf860bf1e11 /project2/proj2_s4498062/dns_tests.py | |
parent | Fix LaTeX warning (diff) |
Added project2 framework
Diffstat (limited to 'project2/proj2_s4498062/dns_tests.py')
-rw-r--r-- | project2/proj2_s4498062/dns_tests.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/project2/proj2_s4498062/dns_tests.py b/project2/proj2_s4498062/dns_tests.py new file mode 100644 index 0000000..66c04ed --- /dev/null +++ b/project2/proj2_s4498062/dns_tests.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python2
+
+""" Tests for your DNS resolver and server """
+
+portnr = 5353
+server = "localhost"
+
+class TestResolver(unittest.TestCase):
+ pass
+
+
+class TestResolverCache(unittest.TestCase):
+ pass
+
+
+class TestServer(unittest.TestCase):
+ pass
+
+
+if __name__ == "__main__":
+ # Parse command line arguments
+ import argparse
+ parser = argparse.ArgumentParser(description="HTTP Tests")
+ parser.add_argument("-s", "--server", type=str, default="localhost")
+ parser.add_argument("-p", "--port", type=int, default=5001)
+ args, extra = parser.parse_known_args()
+ portnr = args.port
+ server = args.server
+
+ # Pass the extra arguments to unittest
+ sys.argv[1:] = extra
+
+ # Start test suite
+ unittest.main()
|