Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test for saving sequence with number of ambiguous chars
- Loading branch information
1 parent
0d0b1ce
commit 2ffe5ea
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from django.core.management import call_command | ||
from django.test import TestCase | ||
|
||
from public_interface.models import Sequences | ||
from public_interface.models import Vouchers | ||
|
||
|
||
class TestViews(TestCase): | ||
def setUp(self): | ||
args = [] | ||
opts = {'dumpfile': 'test_db_dump.xml', 'verbosity': 0} | ||
cmd = 'migrate_db' | ||
call_command(cmd, *args, **opts) | ||
|
||
def test_save_sequences_ambiguous_characters(self): | ||
voucher_model = Vouchers.objects.get(code='CP100-18') | ||
sequence_model = Sequences( | ||
code=voucher_model, | ||
sequences='???---NNNATCTACTA', | ||
gene_code='COI' | ||
) | ||
sequence_model.save() | ||
|
||
sequence_model = Sequences.objects.get(code=voucher_model, gene_code='COI') | ||
self.assertEqual(sequence_model.number_ambiguous_bp, 9) |