def test_nan_and_fetch_warning(self):
        """Test whether the XML data is set tot NaN in case of an error and
        no stale cache is available. Also test if a warning is given to the
        user."""
        bs = BoringSearch(objecttype=pydov.types.boring.Boring)

        with pytest.warns(XmlFetchWarning):
            df = bs.search(query=PropertyIsEqualTo(
                'pkey_boring', build_dov_url('data/boring/2016-122561')))

        assert np.isnan(df.iloc[0].boorgatmeting)