diff --git a/nsupdate/api/_tests/test_api.py b/nsupdate/api/_tests/test_api.py index 6ee07dc..07b3e02 100644 --- a/nsupdate/api/_tests/test_api.py +++ b/nsupdate/api/_tests/test_api.py @@ -2,6 +2,8 @@ Tests for api package. """ +import time + from django.core.urlresolvers import reverse from nsupdate.main.dnstools import query_ns, FQDN @@ -123,6 +125,8 @@ def test_nic_update_authorized_update_other_services(client): assert response.status_code == 200 # must be good (was different IP) assert response.content == b'good 1.2.3.4' + # test below was sometimes failing, give other service n seconds to process the update: + time.sleep(1.0) # now check if it updated the other service also: assert query_ns(TEST_HOST_OTHER, 'A') == '1.2.3.4' response = client.get(reverse('nic_update') + '?myip=2.3.4.5',