Merge pull request #61 from Nebucatnetzer/dev

Dev
This commit is contained in:
Andreas Zweili 2022-02-07 23:05:34 +01:00 committed by GitHub
commit abcdb0961e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View File

@ -26,7 +26,7 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -nauto --ds=network_inventory.settings.local --nomigrations
pytest -nauto --ds=network_inventory.settings.ram_test --nomigrations
publish:
# Ensure test job passes before pushing image.

View File

@ -45,7 +45,7 @@ def test_device_update_view(create_admin_user):
'user': '',
'installation_date': ''}
response = client.post('/update/device/{}/'.format(device.pk), data)
assert response.status_code == 302
assert response.status_code == 200
device.refresh_from_db()
assert device.name == data['name']

View File

@ -0,0 +1,15 @@
from .base import *
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'development_key'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
CRISPY_FAIL_SILENTLY = not DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}