def test_web_trace_enabled(self, mock_disable, mock_enable): opts.set_defaults(self.conf_fixture.conf, enabled=True, hmac_keys="MY_KEY") opts.enable_web_trace(self.conf_fixture.conf) opts.disable_web_trace(self.conf_fixture.conf) mock_enable.assert_called_once_with("MY_KEY") mock_disable.assert_called_once_with()
def test_web_trace_disabled(self, mock_disable, mock_enable): opts.set_defaults(self.conf_fixture.conf, hmac_keys="MY_KEY") opts.enable_web_trace(self.conf_fixture.conf) opts.disable_web_trace(self.conf_fixture.conf) self.assertEqual(0, mock_enable.call_count) self.assertEqual(0, mock_disable.call_count)