Unverified Commit 23a857b7 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Fixes 376 and uses non-default PW for local testing (#441)

* Fixces 376 and uses non-default PW for local testing

* Fixes bad indentation
parent c59c81fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -24,6 +24,6 @@ We suggest using Anaconda Python to install Autocnet within a virtual environmen
## How to run the test suite locally

1. Install Docker
2. Get the Postgresql with Postgis container and run it `docker run --name testdb -e POSTGRES_PASSOWRD='' -e POSTGRES_USER='postgres' -p 5432:5432 -d mdillon/postgis`
2. Get the Postgresql with Postgis container and run it `docker run --name testdb -e POSTGRES_PASSOWRD='NotTheDefault' -e POSTGRES_USER='postgres' -p 5432:5432 -d mdillon/postgis`
3. create database template_postgis: `docker exec testdb psql -c 'create database template_postgis;' -U postgres`
4. Run the test suite: `autocnet_config=config/test_config.yml pytest autocnet`
4. Run the test suite: `pytest autocnet`
+4 −1
Original line number Diff line number Diff line
import os
from unittest.mock import Mock, MagicMock

import networkx as nx
@@ -67,7 +68,7 @@ def default_configuration():
              'processing_memory': 8192},
              'database': {'type': 'postgresql',
                  'username': 'postgres',
                  'password': '',
                  'password': 'NotTheDefault',
                  'host': 'localhost',
                  'port': 5432,
                  'pgbouncer_port': 5432,
@@ -87,6 +88,8 @@ def default_configuration():
                  'semiminor_rad': 3376200,
                  'proj4_str': '+proj:longlat +a:3396190 +b:3376200 +no_defs',
                  'dem': None}}
    if os.environ.get('TRAVIS', False):
        config['database']['password'] = ''
    return config

@pytest.fixture()