Fix tests

remotes/origin/enhancement/email-actions
David Barragán Merino 2014-05-22 20:26:36 +02:00
parent d507b63f44
commit ada51440e7
2 changed files with 5 additions and 3 deletions

View File

@ -13,7 +13,6 @@ def setup_module(module):
mock.Mock(return_value=factories.DomainFactory()))
module.patcher.start()
def teardown_module(module):
module.patcher.stop()

View File

@ -1,8 +1,9 @@
import pytest
from django.core import management
from .. import factories
from django.conf import settings
from .. import factories
@pytest.fixture
@ -47,11 +48,13 @@ def test_sequences(seq):
@pytest.mark.django_db
def test_unique_reference_per_project(seq, refmodels):
# management.call_command("loaddata", "initial_project_templates")
domain = factories.DomainFactory(public_register=True)
settings.DOMAIN_ID = domain.id
project = factories.ProjectFactory.create()
seqname = refmodels.make_sequence_name(project)
assert seqname == "references_project1"
assert seqname == "references_project3"
assert seq.exists(seqname)
assert refmodels.make_unique_reference_id(project, create=True) == 1