Skip to content

Commit fa4e84a

Browse files
committed
example config for testing
1 parent 6a33d63 commit fa4e84a

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ python:
33
- "2.7"
44
install:
55
- pip install -r requirements.txt
6+
- cp tests/_example_config.py rootio/config.py
67
script: pytest

tests/_example_config.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# -*- coding: utf-8 -*-
2+
3+
import os
4+
from utils import make_dir
5+
6+
PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
7+
INSTANCE_FOLDER_PATH = os.path.join(PROJECT_ROOT, 'instance')
8+
9+
class BaseConfig(object):
10+
PROJECT = "rootio"
11+
SECRET_KEY = 'some random key'
12+
CONTENT_DIR = "/var/content"
13+
LOG_FOLDER = os.path.join(INSTANCE_FOLDER_PATH, 'logs')
14+
ZMQ_BIND_ADDR = "tcp://127.0.0.1:55777"
15+
ZMQ_SOCKET_TYPE = "PUB"
16+
ACCEPT_LANGUAGES = {'en':'English'}
17+
18+
class DefaultConfig(BaseConfig):
19+
pass
20+
21+
class TestConfig(BaseConfig):
22+
TESTING = True
23+
CSRF_ENABLED = False
24+
WTF_CSRF_ENABLED = False
25+
26+
SQLALCHEMY_ECHO = False
27+
SQLALCHEMY_DATABASE_URI = 'sqlite://' # store db in memory
28+
29+
MAIL_DEFAULT_SENDER = '[email protected]'

0 commit comments

Comments
 (0)