For some reason the previous integrety fixes, added made the failed flowcell be in...
[htsworkflow.git] / htsworkflow / frontend / experiments / test_experiments.py
index 8907192cf46376b1b8a28639f9a8c44207a5ef72..fab24ccf36a5120b7b4229308aa2b4e037af5ae6 100644 (file)
@@ -30,17 +30,6 @@ NSMAP = {'libns':'http://jumpgate.caltech.edu/wiki/LibraryOntology#'}
 
 from django.db import connection
 
-OLD_DB_NAME = settings.DATABASES['default']['NAME']
-VERBOSITY = 0
-def setUpModule():
-    setup_test_environment()
-    settings.DEBUG = False
-    connection.creation.create_test_db(VERBOSITY)
-
-def tearDownModule():
-    connection.creation.destroy_test_db(OLD_DB_NAME, VERBOSITY)
-    teardown_test_environment()
-
 class ClusterStationTestCases(TestCase):
     fixtures = ['test_flowcells.json']
 
@@ -299,8 +288,8 @@ class ExperimentsTestCases(TestCase):
         tree = fromstring(response.content)
         flowcell_spans = tree.xpath('//span[@property="libns:flowcell_id"]',
                                     namespaces=NSMAP)
-        self.assertEqual(flowcell_spans[0].text, '30012AAXX (failed)')
-        failed_fc_span = flowcell_spans[0]
+        self.assertEqual(flowcell_spans[1].text, '30012AAXX (failed)')
+        failed_fc_span = flowcell_spans[1]
         failed_fc_a = failed_fc_span.getparent()
         # make sure some of our RDF made it.
         self.assertEqual(failed_fc_a.get('typeof'), 'libns:IlluminaFlowcell')
@@ -688,16 +677,6 @@ class TestSequencer(TestCase):
         errmsgs = list(inference.run_validation())
         self.assertEqual(len(errmsgs), 0)
 
-
-OLD_DB = settings.DATABASES['default']['NAME']
-def setUpModule():
-    setup_test_environment()
-    connection.creation.create_test_db()
-
-def tearDownModule():
-    connection.creation.destroy_test_db(OLD_DB)
-    teardown_test_environment()
-
 def suite():
     from unittest2 import TestSuite, defaultTestLoader
     suite = TestSuite()