'Test a valid platform setup.'

def test_package_invalid(self):

    files = {'bad.yaml': (BASE_CONFIG + '        packages:\n                p1:\n                        group:    ["a"]')}
    with patch_yaml_files(files):
        res = check_config.check(get_test_config_dir('bad.yaml'))
        change_yaml_files(res)
        err = res['except'].pop('homeassistant.packages.p1')
        assert (res['except'] == {})
        assert (err == {'group': ['a']})
        assert (res['yaml_files'] == ['.../bad.yaml'])
        assert (res['components'] == {})
        assert (res['secret_cache'] == {})
        assert (res['secrets'] == {})
