Skip to content

Commit

Permalink
reseting indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosp420 committed May 7, 2017
1 parent a83e730 commit 7ee380d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions voseq/create_dataset/tests/tests_create_fasta_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class CreateFASTADatasetTest(TestCase):
def setUp(self):
with connection.cursor() as cursor:
cursor.execute("alter sequence public_interface_genes_id_seq restart with 1")
cursor.execute("alter sequence public_interface_taxonsets_id_seq restart with 1")
args = []
opts = {'dumpfile': 'test_db_dump2.xml', 'verbosity': 0}
cmd = 'migrate_db'
Expand Down
3 changes: 1 addition & 2 deletions voseq/genbank_fasta/tests/test_genbank_fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
class TestGenBankFasta(TestCase):
def setUp(self):
with connection.cursor() as cursor:
cursor.execute("alter sequence public_interface_genesets_id_seq restart with 1")
cursor.execute("alter sequence public_interface_taxonsets_id_seq restart with 1")
cursor.execute("alter sequence public_interface_genes_id_seq restart with 1")
args = []
opts = {'dumpfile': 'test_db_dump.xml', 'verbosity': 0}
cmd = 'migrate_db'
Expand Down
2 changes: 2 additions & 0 deletions voseq/public_interface/tests/test_advanced_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
@override_settings(HAYSTACK_CONNECTIONS=TEST_INDEX)
class TestAdvancedSearch(TestCase):
def setUp(self):
with connection.cursor() as cursor:
cursor.execute("alter sequence public_interface_genes_id_seq restart with 1")
args = []
opts = {'dumpfile': 'test_db_dump.xml', 'verbosity': 0}
cmd = 'migrate_db'
Expand Down
3 changes: 3 additions & 0 deletions voseq/public_interface/tests/test_saving_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.core.management import call_command
from django.db import connection
from django.test import TestCase

from public_interface.models import Sequences
Expand All @@ -7,6 +8,8 @@

class TestViews(TestCase):
def setUp(self):
with connection.cursor() as cursor:
cursor.execute("alter sequence public_interface_vouchers_id_seq restart with 1")
args = []
opts = {'dumpfile': 'test_db_dump.xml', 'verbosity': 0}
cmd = 'migrate_db'
Expand Down

0 comments on commit 7ee380d

Please sign in to comment.