Add test for configdata.is_valid_prefix

This commit is contained in:
Florian Bruhin 2017-06-15 14:55:37 +02:00
parent 18eb133811
commit fede64ba7a

View File

@ -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):