From 5291eacb066b2df518c052e52c6f3414ded0a25e Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 26 Sep 2014 01:23:36 +0200 Subject: [PATCH] fix netmask and pep8 in test setup --- conftest.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index 2ac675a..0be7adc 100644 --- a/conftest.py +++ b/conftest.py @@ -91,10 +91,10 @@ def db_init(db): # note: db is a predefined fixture and required here to have t ) # a Host for api / session update tests hostname = TEST_HOST.host - h = Host(name=hostname, domain=dt, created_by=u) + h = Host(name=hostname, domain=dt, created_by=u, netmask_ipv4=29, netmask_ipv6=64) h.generate_secret(secret=TEST_SECRET) hostname2 = TEST_HOST2.host - h2 = Host(name=hostname2, domain=dt, created_by=u2) + h2 = Host(name=hostname2, domain=dt, created_by=u2, netmask_ipv4=29, netmask_ipv6=64) h2.generate_secret(secret=TEST_SECRET2) # "update other service" ddns_client feature @@ -117,7 +117,8 @@ def db_init(db): # note: db is a predefined fixture and required here to have t created_by=u, ) - RelatedHost.objects.create(name=RELATED_HOST_NAME, interface_id_ipv4="0.0.0.1", interface_id_ipv6="::1", main_host=h) + RelatedHost.objects.create(name=RELATED_HOST_NAME, + interface_id_ipv4="0.0.0.1", interface_id_ipv6="::1", main_host=h) def pytest_runtest_setup(item):