Exemplo n.º 1
0
    def start_fixture(self):
        cli = influx_utils.FakeInfluxClient()
        st = storage.get_storage()
        st._conn = cli

        self._get_storage_patch = mock.patch(
            'cloudkitty.storage.get_storage',
            new=lambda **kw: st,
        )
        self._get_storage_patch.start()

        super(InfluxStorageDataFixture, self).start_fixture()
Exemplo n.º 2
0
    def start_fixture(self):
        cli = influx_utils.FakeInfluxClient()
        st = storage.get_storage()
        st._conn = cli

        self._get_storage_patch = mock.patch(
            'cloudkitty.storage.get_storage',
            new=lambda **kw: st,
        )
        self._get_storage_patch.start()
        v2_api_summary.Summary.reload()
        v2_api_dataframes.DataFrameList.reload()

        super(InfluxStorageDataFixture, self).start_fixture()