环境准备
sudo apt-get install python-virtualenv
virtualenv --no-site-packages --python=python2.7 sentuSrv
cd sentuSrv
source bin/activate
sudo apt-get install libpq-dev python-dev
pip install tornado
easy_install psycopg2
psycopg2包装类
git clone https://github.com/FSX/momoko.git
python setup.py install
export MOMOKO_TEST_DB='exampledb'
export MOMOKO_TEST_USER='dbuser'
export MOMOKO_TEST_PASSWORD='qq'
export MOMOKO_TEST_HOST='192.168.1.102'
export MOMOKO_TEST_PORT='5432'
python setup.py test
网友评论