Permalink
Browse files

add __main__ section

  • Loading branch information...
1 parent 1befa48 commit 689c19a496e9e485cadcbe12dc5cbe7303ae6bcb Jeff Hammel committed Jul 20, 2012
Showing with 10 additions and 9 deletions.
  1. +5 −5 dzclient/tests/test_datazilla_request.py
  2. +5 −4 dzclient/tests/test_datazilla_result.py
@@ -1,12 +1,9 @@
-from unittest import TestCase
-
+import unittest
from mock import patch
-
from dzclient import DatazillaRequest, DatazillaResult
-
-class DatazillaRequestTest(TestCase):
+class DatazillaRequestTest(unittest.TestCase):
def test_init_with_date(self):
"""Can provide test date on instantiation."""
req = DatazillaRequest(
@@ -144,3 +141,6 @@ def test_send(self,
header['Content-type'],
'application/x-www-form-urlencoded',
)
+
+if __name__ == '__main__':
+ unittest.main()
@@ -1,10 +1,8 @@
-from unittest import TestCase
-
+import unittest
from dzclient import DatazillaResult
-
-class DatazillaResultTest(TestCase):
+class DatazillaResultTest(unittest.TestCase):
def test_init_with_results(self):
"""Can initialize with a dictionary of results."""
data = {"suite": {"test": [1, 2, 3]}}
@@ -54,3 +52,6 @@ def test_join_results(self):
"suite2": {"test2a": [4]},
}
)
+
+if __name__ == '__main__':
+ unittest.main()

0 comments on commit 689c19a

Please sign in to comment.