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__])
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)
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)