Ejemplo n.º 1
0
def setup():
    global django_store1, django_store2
    clean_up()
    sumatra.launch.MockLaunchMode = MockLaunchMode
    sumatra.datastore.MockDataStore = MockDataStore
    sumatra.parameters.MockParameterSet = MockParameterSet
    if django_store1 is None:
        django_store1 = django_store.DjangoRecordStore(db_file="test.db")
    if django_store2 is None:
        django_store2 = django_store.DjangoRecordStore(db_file="test2.db")
    django_store.db_config.configure()
    vcs_list.append(sys.modules[__name__])
Ejemplo n.º 2
0
def setup():
    global django_store1, django_store2
    clean_up()
    sumatra.launch.MockLaunchMode = MockLaunchMode
    sumatra.datastore.MockDataStore = MockDataStore
    sumatra.parameters.MockParameterSet = MockParameterSet
    if django_store1 is None:
        django_store1 = django_store.DjangoRecordStore(db_file="test.db")
    if django_store2 is None:
        django_store2 = django_store.DjangoRecordStore(db_file="test2.db")
    django_store.db_config.configure()
    vcs_list.append(sys.modules[__name__])
Ejemplo n.º 3
0
def setup():
    global django_store1, django_store2, django_dir
    django_dir = tempfile.mkdtemp(prefix="sumatra-test-")
    cwd_before = os.getcwd()
    os.chdir(django_dir)
    sumatra.launch.MockLaunchMode = MockLaunchMode
    sumatra.datastore.MockDataStore = MockDataStore
    sumatra.parameters.MockParameterSet = MockParameterSet
    if django_store1 is None:
        django_store1 = django_store.DjangoRecordStore(db_file="test.db")
    if django_store2 is None:
        django_store2 = django_store.DjangoRecordStore(db_file="test2.db")
    django_store.db_config.configure()
    vcs_list.append(sys.modules[__name__])
    os.chdir(cwd_before)
Ejemplo n.º 4
0
def setup():
    global django_store1, django_store2, django_dir
    django_dir = tempfile.mkdtemp(prefix='sumatra-test-')
    cwd_before = os.getcwd()
    os.chdir(django_dir)
    sumatra.launch.MockLaunchMode = MockLaunchMode
    sumatra.datastore.MockDataStore = MockDataStore
    sumatra.parameters.MockParameterSet = MockParameterSet
    if django_store1 is None:
        django_store1 = django_store.DjangoRecordStore(db_file="test.db")
    if django_store2 is None:
        django_store2 = django_store.DjangoRecordStore(db_file="test2.db")
    django_store.db_config.configure()
    vcs_list.append(sys.modules[__name__])
    os.chdir(cwd_before)