BUG: fix invalid check in tests.
BUG: fix tests when no config files is present.