from django.test import TestCase
from django.utils.six import StringIO
out = StringIO()
try:
call_command("create_qn_target", organism="homo_sapiens", min=1, stdout=out)
except SystemExit as e: // this is okay!
pass
stdout = out.getvalue()
self.assertTrue("Target file" in stdout)
path = stdout.split("\n")[0].split(":")[1].strip()
self.assertTrue(os.path.exists(path))
self.assertEqual(path, utils.get_most_recent_qn_target_for_organism(homo_sapiens).absolute_file_path)
After Change
experiment.organism_names = [homo_sapiens.name]
experiment.save()
// We don"t have a 0.tsv
codes = [str(i) for i in range(1, 201)]
for code in codes:
sample = Sample()