From: Charles-Henri Bruyand Date: Wed, 2 May 2018 13:55:34 +0000 (+0200) Subject: Skip subtree option tests against auth X-Git-Tag: rec-4.1.3~4^2~6^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=112e94e9c53b90058782bb82010afcb09608ff64;p=pdns Skip subtree option tests against auth (cherry picked from commit 921442337d81d1e9a4fa0e1f70f140e1f3ccf472) --- diff --git a/regression-tests.api/test_Cache.py b/regression-tests.api/test_Cache.py index 3ab4ea68c..d8ffc1596 100644 --- a/regression-tests.api/test_Cache.py +++ b/regression-tests.api/test_Cache.py @@ -1,4 +1,5 @@ from test_helper import ApiTestCase, is_auth, is_recursor, sdig +import unittest class Servers(ApiTestCase): @@ -9,6 +10,7 @@ class Servers(ApiTestCase): data = r.json() self.assertIn('count', data) + @unittest.skipIf(not is_recursor(), "Not applicable") def test_flush_count(self): sdig("ns1.example.com", 'A') r = self.session.put(self.url("/api/v1/servers/localhost/cache/flush?domain=ns1.example.com.")) @@ -17,6 +19,7 @@ class Servers(ApiTestCase): self.assertIn('count', data) self.assertEquals(1, data['count']) + @unittest.skipIf(not is_recursor(), "Not applicable") def test_flush_subtree(self): sdig("ns1.example.com", 'A') sdig("ns2.example.com", 'A')