File test/add_plugin_defaults.py artifact a20337c776 part of check-in 85f6aa649a


# type: test
# title: init checks
# description: collect defaults from plugins
# config:
#    { name: setme, value: 2, type: int }
# version: 0.2
# priority: standard
# 
# add_plugin_defaults() doesn't collect from all files,
# it's for individual extraction.

import pytest
import pluginconf

@pytest.fixture
def pmd():
    return pluginconf.plugin_meta(fn=__file__)

def add_plugin_defaults(pmd):
    conf = {}
    state = {}
    pluginconf.add_plugin_defaults(conf, state, pmd, "add_plugin_defaults")
    assert conf == {'setme': 2}
    assert state == {'add_plugin_defaults': True}