Merge pull request #80 from ninech/fix-79

Import Error Fix
This commit is contained in:
Demian 2018-06-28 10:22:17 +02:00 committed by GitHub
commit 48accce8e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 32 deletions

View File

@ -14,14 +14,14 @@ services:
- docker
install:
- docker-compose -f docker-compose.test.yml pull --parallel
- docker-compose -f docker-compose.test.yml build
- docker-compose pull --parallel
- docker-compose build
script:
- docker-compose -f docker-compose.test.yml run app
- docker-compose run netbox ./manage.py test
after_script:
- docker-compose -f docker-compose.test.yml down
- docker-compose down
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"

View File

@ -306,10 +306,10 @@ You can use the following ENV variables to customize the build:
## Tests
To run the test coming with NetBox, use the `docker-compose.test.yml` file as such:
To run the test coming with NetBox, use the `docker-compose.yml` file as such:
```
$ docker-compose -f docker-compose.test.yml run --rm app
$ docker-compose run netbox ./manage.py test
```
## About

View File

@ -1,24 +0,0 @@
version: '3'
services:
app:
build:
context: .
args:
- BRANCH=${BRANCH-master}
image: ninech/netbox:${BRANCH-latest}
depends_on:
- postgres
env_file: netbox.env
volumes:
- ./configuration:/etc/netbox/config:ro
command:
- ./manage.py
- test
postgres:
image: postgres:10.2-alpine
env_file: postgres.env
volumes:
netbox-static-files:
driver: local
netbox-nginx-config:
driver: local

View File

@ -43,7 +43,7 @@
# type: selection
# label: Choose between items
# required: false
# filterable: true
# filter_logic: loose
# weight: 30
# on_objects:
# - dcim.models.Device

View File

@ -1,4 +1,4 @@
from extras.constants import CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE, CF_TYPE_URL, CF_TYPE_SELECT
from extras.constants import CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE, CF_TYPE_URL, CF_TYPE_SELECT, CF_FILTER_CHOICES
from extras.models import CustomField, CustomFieldChoice
from ruamel.yaml import YAML