diff --git a/tests/unit/config/test_configdata.py b/tests/unit/config/test_configdata.py index c1a73b47f..6e4940cee 100644 --- a/tests/unit/config/test_configdata.py +++ b/tests/unit/config/test_configdata.py @@ -40,6 +40,13 @@ def test_init_benchmark(benchmark): benchmark(configdata.init) +def test_is_valid_prefix(monkeypatch): + monkeypatch.setattr(configdata, 'DATA', ['foo.bar']) + assert configdata.is_valid_prefix('foo') + assert not configdata.is_valid_prefix('foo.bar') + assert not configdata.is_valid_prefix('foa') + + class TestReadYaml: def test_valid(self):