1 # Copyright (C) Internet Systems Consortium, Inc. ("ISC") 2 # 3 # SPDX-License-Identifier: MPL-2.0 4 # 5 # This Source Code Form is subject to the terms of the Mozilla Public 6 # License, v. 2.0. If a copy of the MPL was not distributed with this 7 # file, you can obtain one at https://mozilla.org/MPL/2.0/. 8 # 9 # See the COPYRIGHT file distributed with this work for additional 10 # information regarding copyright ownership. 11 12 import isctest 13 import pytest 14 15 # isctest.asyncserver requires dnspython >= 2.0.0 16 pytest.importorskip("dns", minversion="2.0.0") 17 18 19 def test_async_hook(): 20 msg = isctest.query.create("example.com.", "A") 21 res = isctest.query.udp(msg, "10.53.0.1") 22 # the test-async plugin changes the status of any positive answer to NOTIMP 23 isctest.check.notimp(res) 24