From 424f70e808db26aa0115c62432db5d2c919f768d Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Tue, 21 Jan 2014 15:55:45 -0800 Subject: [PATCH] Explicitly list initial_data.json for the test data loader fixtures South wasn't automatically loading initial_data.json, adding them to the test case data loading fixture seems to have worked. --- .../frontend/experiments/test_experiments.py | 19 ++++++++++++++----- htsworkflow/frontend/samples/test_samples.py | 9 ++++++--- .../pipelines/test/test_retrive_config.py | 3 ++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/htsworkflow/frontend/experiments/test_experiments.py b/htsworkflow/frontend/experiments/test_experiments.py index fab24cc..9cafb03 100644 --- a/htsworkflow/frontend/experiments/test_experiments.py +++ b/htsworkflow/frontend/experiments/test_experiments.py @@ -31,7 +31,8 @@ NSMAP = {'libns':'http://jumpgate.caltech.edu/wiki/LibraryOntology#'} from django.db import connection class ClusterStationTestCases(TestCase): - fixtures = ['test_flowcells.json'] + fixtures = ['initial_data.json', + 'test_flowcells.json'] def test_default(self): c = models.ClusterStation.default() @@ -79,7 +80,8 @@ class ClusterStationTestCases(TestCase): class SequencerTestCases(TestCase): - fixtures = ['test_flowcells.json'] + fixtures = ['initial_data.json', + 'test_flowcells.json'] def test_default(self): # starting with no default @@ -131,7 +133,8 @@ class SequencerTestCases(TestCase): class ExperimentsTestCases(TestCase): - fixtures = ['test_flowcells.json', + fixtures = ['initial_data.json', + 'test_flowcells.json', ] def setUp(self): @@ -480,6 +483,10 @@ class ExperimentsTestCases(TestCase): class TestFileType(TestCase): + fixtures = ['initial_data.json', + 'test_flowcells.json', + ] + def test_file_type_unicode(self): file_type_objects = models.FileType.objects name = 'QSEQ tarfile' @@ -538,7 +545,8 @@ class TestFileType(TestCase): self.assertEqual(result.get('end', None), end) class TestEmailNotify(TestCase): - fixtures = ['test_flowcells.json'] + fixtures = ['initial_data.json', + 'test_flowcells.json'] def test_started_email_not_logged_in(self): response = self.client.get('/experiments/started/153/') @@ -588,7 +596,8 @@ def multi_lane_to_dict(lane): return dict( ((x['library_id'],x) for x in lane) ) class TestSequencer(TestCase): - fixtures = ['test_flowcells.json', + fixtures = ['initial_data.json', + 'test_flowcells.json', ] def test_name_generation(self): diff --git a/htsworkflow/frontend/samples/test_samples.py b/htsworkflow/frontend/samples/test_samples.py index 594f281..791bf05 100644 --- a/htsworkflow/frontend/samples/test_samples.py +++ b/htsworkflow/frontend/samples/test_samples.py @@ -26,7 +26,8 @@ from htsworkflow.util.conversion import unicode_or_none from htsworkflow.util.ethelp import validate_xhtml class LibraryTestCase(TestCase): - fixtures = ['test_samples.json'] + fixtures = ['initial_data.json', + 'test_samples.json'] def setUp(self): create_db(self) @@ -52,7 +53,8 @@ class SampleWebTestCase(TestCase): Test returning data from our database in rest like ways. (like returning json objects) """ - fixtures = ['test_samples.json'] + fixtures = ['initial_data.json', + 'test_samples.json'] def test_library_info(self): for lib in Library.objects.all(): @@ -279,7 +281,8 @@ except ImportError,e: class TestRDFaLibrary(TestCase): - fixtures = ['test_samples.json'] + fixtures = ['initial_data.json', + 'test_samples.json'] def test_parse_rdfa(self): model = get_rdf_memory_model() diff --git a/htsworkflow/pipelines/test/test_retrive_config.py b/htsworkflow/pipelines/test/test_retrive_config.py index d06508e..cf30dd7 100644 --- a/htsworkflow/pipelines/test/test_retrive_config.py +++ b/htsworkflow/pipelines/test/test_retrive_config.py @@ -17,7 +17,8 @@ from htsworkflow.pipelines.retrieve_config import \ save_sample_sheet class RetrieveTestCases(TestCase): - fixtures = ['test_flowcells.json'] + fixtures = ['initial_data.json', + 'test_flowcells.json'] def setUp(self): pass -- 2.30.2