~lutostag/ubuntu/trusty/maas/1.5.2+packagefix

« back to all changes in this revision

Viewing changes to src/maasserver/tests/test_dns.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2014-03-28 10:43:53 UTC
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: package-import@ubuntu.com-20140328104353-ekpolg0pm5xnvq2s
Tags: upstream-1.5+bzr2204
ImportĀ upstreamĀ versionĀ 1.5+bzr2204

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
from maasserver.utils import map_enum
39
39
from maastesting.celery import CeleryFixture
40
40
from maastesting.fakemethod import FakeMethod
 
41
from maastesting.matchers import MockCalledOnceWith
41
42
from mock import (
42
43
    ANY,
43
44
    call,
304
305
        Config.objects.set_config("upstream_dns", random_ip)
305
306
        patched_task = self.patch(dns.tasks.write_full_dns_config, "delay")
306
307
        dns.write_full_dns_config()
307
 
        patched_task.assert_called_once_with(
308
 
            zones=ANY, callback=ANY, upstream_dns=random_ip)
 
308
        self.assertThat(patched_task, MockCalledOnceWith(
 
309
            zones=ANY, callback=ANY, upstream_dns=random_ip))
309
310
 
310
311
    def test_write_full_dns_doesnt_call_task_it_no_interface_configured(self):
311
312
        self.patch(settings, 'DNS_CONNECT', True)