4cf62af8ab
"public" field means that this zone can be used by every user (not just the owner) to create hosts there "available" field means that the nameserver is operating and reachable
22 lines
760 B
Python
22 lines
760 B
Python
import pytest
|
|
|
|
from django.utils.translation import activate
|
|
|
|
|
|
# Note: fixture must be "function" scope (default), see https://github.com/pelme/pytest_django/issues/33
|
|
@pytest.fixture(autouse=True)
|
|
def db_init(db):
|
|
"""
|
|
Init the database contents for testing, so we have a service domain, ...
|
|
"""
|
|
from nsupdate.main.models import Domain
|
|
Domain.objects.create(domain='nsupdate.info',
|
|
nameserver_ip='85.10.192.104',
|
|
nameserver_update_algorithm='HMAC_SHA512',
|
|
nameserver_update_key='YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==',
|
|
public=True)
|
|
|
|
|
|
def pytest_runtest_setup(item):
|
|
activate('en')
|