Change unittest2 back into unittest.
[htsworkflow.git] / htsworkflow / submission / test / test_condorfastq.py
index dd41c61aab348d3877ebd2f3fb81dbc9c957ad35..2d232715e5289d93c17b68da92c7dfdac45f6b04 100644 (file)
@@ -5,7 +5,12 @@ import os
 from pprint import pprint
 import shutil
 import tempfile
-import unittest
+
+from django.test import TestCase
+from django.test.utils import setup_test_environment, \
+     teardown_test_environment
+from django.db import connection
+from django.conf import settings
 
 from htsworkflow.submission.condorfastq import CondorFastqExtract
 from htsworkflow.submission.results import ResultMap
@@ -384,12 +389,11 @@ lib_turtle = """@prefix : <http://www.w3.org/1999/xhtml> .
         libns:made_by "Gary Gygax"@en ;
         libns:name "Paired Ends ASDF"@en ;
         libns:replicate "1"@en;
-        libns:species "Mus musculus"@en ;
+        libns:species_name "Mus musculus"@en ;
         libns:stopping_point "Completed"@en ;
         libns:total_unique_locations 8841201 .
         # cell_line
 
-
 <http://localhost/library/12345/>
         a libns:Library ;
         libns:affiliation "TSR"@en;
@@ -405,14 +409,14 @@ lib_turtle = """@prefix : <http://www.w3.org/1999/xhtml> .
         libns:made_by "Gary Gygax"@en ;
         libns:name "Paired Ends THING"@en ;
         libns:replicate "1"@en;
-        libns:species "Mus musculus"@en ;
+        libns:species_name "Mus musculus"@en ;
         libns:stopping_point "Completed"@en ;
         libns:total_unique_locations 8841201 .
         # cell_line
 """
 HOST = "http://localhost"
 
-class TestCondorFastq(unittest.TestCase):
+class TestCondorFastq(TestCase):
     def setUp(self):
         self.cwd = os.getcwd()
 
@@ -677,9 +681,11 @@ class TestCondorFastq(unittest.TestCase):
 
 
 def suite():
-    suite = unittest.makeSuite(TestCondorFastq, 'test')
+    from unittest import TestSuite, defaultTestLoader
+    suite = TestSuite()
+    suite.addTests(defaultTestLoader.loadTestsFromTestCase(TestCondorFastq))
     return suite
 
 if __name__ == "__main__":
-    unittest.main(defaultTest='suite')
-
+    from unittest import main
+    main(defaultTest='suite')