mirror of
https://github.com/shouptech/humulus.git
synced 2026-02-03 19:39:43 +00:00
fix test config
This commit is contained in:
parent
243b8d839b
commit
a81562f379
3 changed files with 7 additions and 11 deletions
|
|
@ -12,12 +12,11 @@ steps:
|
|||
- name: test
|
||||
image: python:3.6
|
||||
commands:
|
||||
# Wait for couch
|
||||
- until curl 'http://couchdb:5984' ; do sleep 1 ; done
|
||||
# Configure settings
|
||||
- export HUMULUS_SETTINGS="$(pwd)/testsettings.py"
|
||||
# Run tests
|
||||
# Install pre-requisites
|
||||
- pip install coverage pytest
|
||||
- pip install -e .
|
||||
# Wait for couch
|
||||
- until curl 'http://couchdb:5984' ; do sleep 1 ; done
|
||||
# Run tests
|
||||
- coverage run -m pytest
|
||||
- coverage report -m
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import uuid
|
||||
|
||||
import pytest
|
||||
|
|
@ -22,8 +23,9 @@ from humulus.couch import build_couch, get_couch, put_doc
|
|||
@pytest.fixture
|
||||
def app():
|
||||
dbname = 'test_{}'.format(str(uuid.uuid4()))
|
||||
couchurl = os.environ.get('COUCH_URL', 'http://127.0.0.1:5984')
|
||||
app = create_app({
|
||||
'COUCH_URL': 'http://127.0.0.1:5984',
|
||||
'COUCH_URL': couchurl,
|
||||
'COUCH_USERNAME': 'admin',
|
||||
'COUCH_PASSWORD': 'password',
|
||||
'COUCH_DATABASE': dbname,
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
SECRET_KEY = b'dev'
|
||||
COUCH_URL='http://couchdb:5984'
|
||||
COUCH_USERNAME='admin'
|
||||
COUCH_PASSWORD='password'
|
||||
COUCH_DATABASE='humulus'
|
||||
Loading…
Add table
Reference in a new issue